prompts: fix calling convention — use call_tool not execute_code for named tools

This commit is contained in:
Levi Neely 2026-05-17 12:30:12 +02:00
parent 317eeb419b
commit 7f49377d41
5 changed files with 24 additions and 21 deletions

View File

@ -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.

View File

@ -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 [...]
```

View File

@ -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: ["<title>", "<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

View File

@ -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.

View File

@ -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.