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: ["