From 7f49377d41f5ce5a1c378f06c6ed6b7e70662346 Mon Sep 17 00:00:00 2001 From: Levi Neely <141506390+lneely@users.noreply.github.com> Date: Sun, 17 May 2026 12:30:12 +0200 Subject: [PATCH] =?UTF-8?q?prompts:=20fix=20calling=20convention=20?= =?UTF-8?q?=E2=80=94=20use=20call=5Ftool=20not=20execute=5Fcode=20for=20na?= =?UTF-8?q?med=20tools?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- prompts/tools-file.md | 15 ++++++++------- prompts/tools-lsp.md | 18 ++++++++++-------- prompts/tools-memory.md | 4 ++-- prompts/tools-reasoning.md | 2 +- prompts/tools-task.md | 6 +++--- 5 files changed, 24 insertions(+), 21 deletions(-) diff --git a/prompts/tools-file.md b/prompts/tools-file.md index ab005ff..b42ed3e 100644 --- a/prompts/tools-file.md +++ b/prompts/tools-file.md @@ -14,19 +14,20 @@ **Calling convention**: ``` -execute_code: steps=[{tool: "file_read", args: ["/abs/path", start, end]}] # segment (preferred) -execute_code: steps=[{tool: "file_read", args: ["/abs/path"]}] # whole file (≤2000 lines) -execute_code: steps=[{tool: "file_write", args: ["/abs/path", "content"]}] -execute_code: steps=[{tool: "file_edit", args: ["/abs/path", "old", "new"]}] -execute_code: steps=[{tool: "file_glob", args: ["src/**/*.go"]}] -execute_code: steps=[{tool: "file_grep", args: ["func.*Handler", "src/"]}] +call_tool: file_read ["/abs/path", start, end] # segment (preferred) +call_tool: file_read ["/abs/path"] # whole file (≤2000 lines) +call_tool: file_write ["/abs/path", "content"] +call_tool: file_edit ["/abs/path", "old", "new"] +call_tool: file_glob ["src/**/*.go"] +call_tool: file_grep ["func.*Handler", "src/"] ``` **Returns**: file contents with line numbers / match results / write confirmation. **Batch independent reads** in a single call for parallel execution: ``` -execute_code: steps=[{tool: "file_read", args: ["a.go", "1", "50"]}, {tool: "file_read", args: ["b.go", "1", "50"]}] +call_tool: file_read ["/a.go", "1", "50"] +call_tool: file_read ["/b.go", "1", "50"] ``` **Prefer segments over full-file reads.** Use `file_grep` or `file_glob` to locate the relevant section, then read only the lines you need with `start`/`end`. Full-file reads are for small files or when you need the whole content. diff --git a/prompts/tools-lsp.md b/prompts/tools-lsp.md index 4667276..2ca4869 100644 --- a/prompts/tools-lsp.md +++ b/prompts/tools-lsp.md @@ -16,13 +16,13 @@ Code intelligence via language servers (gopls, clangd, intelephense). The bridge **Calling convention**: ``` -execute_code: steps=[{tool: "lsp_definition", args: ["/abs/path/to/file.go", "42", "10"]}] -execute_code: steps=[{tool: "lsp_references", args: ["/abs/path/to/file.go", "42", "10"]}] -execute_code: steps=[{tool: "lsp_hover", args: ["/abs/path/to/file.go", "42", "10"]}] -execute_code: steps=[{tool: "lsp_rename", args: ["/abs/path/to/file.go", "42", "10", "NewName"]}] -execute_code: steps=[{tool: "lsp_symbols", args: ["/abs/path/to/file.go"]}] -execute_code: steps=[{tool: "lsp_diagnostics", args: ["/abs/path/to/file.go"]}] -execute_code: steps=[{tool: "lsp_completion", args: ["/abs/path/to/file.go", "42", "10"]}] +call_tool: lsp_definition ["/abs/path/to/file.go", "42", "10"] +call_tool: lsp_references ["/abs/path/to/file.go", "42", "10"] +call_tool: lsp_hover ["/abs/path/to/file.go", "42", "10"] +call_tool: lsp_rename ["/abs/path/to/file.go", "42", "10", "NewName"] +call_tool: lsp_symbols ["/abs/path/to/file.go"] +call_tool: lsp_diagnostics ["/abs/path/to/file.go"] +call_tool: lsp_completion ["/abs/path/to/file.go", "42", "10"] ``` **Line/col are 1-indexed** — matching `file_read` output. Use the line numbers from `file_read` directly. @@ -35,5 +35,7 @@ execute_code: steps=[{tool: "lsp_completion", args: ["/abs/path/to/file.go", "4 **Parallel reads**: all read-only LSP tools can be batched in a single call: ``` -execute_code: steps=[{tool: "lsp_hover", args: [...]}, {tool: "lsp_symbols", args: [...]}, {tool: "lsp_completion", args: [...]}] +call_tool: lsp_hover [...] +call_tool: lsp_symbols [...] +call_tool: lsp_completion [...] ``` diff --git a/prompts/tools-memory.md b/prompts/tools-memory.md index 92c7e40..ec5e16d 100644 --- a/prompts/tools-memory.md +++ b/prompts/tools-memory.md @@ -8,7 +8,7 @@ Persist a fact that would otherwise be lost when the session ends. **Calling convention**: ``` -execute_code: steps=[{tool: "memory_remember", args: ["", "<tags_csv>", "<body>"]}] +call_tool: memory_remember ["<title>", "<tags_csv>", "<body>"] ``` - `title`: short noun phrase - `tags_csv`: comma-separated tags; pick specific and reusable terms @@ -33,7 +33,7 @@ Search stored memories for relevant context. **Calling convention**: ``` -execute_code: steps=[{tool: "memory_recall", args: ["<query>"]}] +call_tool: memory_recall ["<query>"] ``` - `query`: keyword, tag, or phrase — searches both filenames and body content diff --git a/prompts/tools-reasoning.md b/prompts/tools-reasoning.md index 4596004..a6eb00d 100644 --- a/prompts/tools-reasoning.md +++ b/prompts/tools-reasoning.md @@ -6,7 +6,7 @@ A scratchpad for externalizing reasoning. The thought is recorded in conversatio **Calling convention**: ``` -execute_code: steps=[{tool: "reasoning_think", args: ["your full reasoning here"]}] +call_tool: reasoning_think ["your full reasoning here"] ``` **Returns**: nothing. The value is entirely in writing the thought. diff --git a/prompts/tools-task.md b/prompts/tools-task.md index 029ba81..1e8f3fa 100644 --- a/prompts/tools-task.md +++ b/prompts/tools-task.md @@ -6,9 +6,9 @@ A session-scoped markdown checklist at `s/$OLLIE_SESSION_ID/plan`. Survives comp **Calling convention**: ``` -execute_code: steps=[{tool: "task_add", args: ["step one", "step two", "..."]}] -execute_code: steps=[{tool: "task_check", args: []}] -execute_code: steps=[{tool: "task_clear", args: []}] +call_tool: task_add ["step one", "step two", "..."] +call_tool: task_check [] +call_tool: task_clear [] ``` **Returns**: confirmation.