diff --git a/src/pages/docs.astro b/src/pages/docs.astro index 4e7e842..cf7ef2d 100644 --- a/src/pages/docs.astro +++ b/src/pages/docs.astro @@ -462,6 +462,8 @@ import BaseLayout from '../layouts/BaseLayout.astro'; - Verify libraries exist before using them (check imports, package.json, etc.) - Use absolute file paths - Read files before editing them +- Prefer symbol_search -> symbol_resolve -> read_file_range for code understanding +- Use grep_search when you need text-pattern search rather than symbol lookup - Add comments sparingly - focus on "why" not "what" - If unclear, ask for clarification @@ -474,14 +476,18 @@ import BaseLayout from '../layouts/BaseLayout.astro'; # Available Tools -**get_workspace_structure** - Get project directory tree -**list_dir** - List files/directories in a path -**read_file** - Read file contents +**get_editor_state** - Get active file, cursor position, and open files +**symbol_search** - Find functions, classes, methods, and types by name +**symbol_resolve** - Resolve a symbol to its exact file and line range +**symbol_references** - Find where a symbol is used +**read_file_range** - Read targeted line ranges from a file +**read_file** - Read full file contents when broader context is needed +**get_workspace_structure** - Get the project directory tree +**grep_search** - Search for text or regex patterns across files +**apply_patch** - Make precise edits to existing files **write_file** - Create or overwrite a file -**apply_patch** - Replace specific content in a file (for edits) -**grep_search** - Search for patterns across files **run_command** - Execute shell commands -**get_editor_state** - Get currently open file and cursor position +**todo_write** - Track multi-step work and show progress

diff --git a/src/pages/tools.astro b/src/pages/tools.astro index 157d388..bd1989d 100644 --- a/src/pages/tools.astro +++ b/src/pages/tools.astro @@ -19,8 +19,8 @@ import BaseLayout from '../layouts/BaseLayout.astro'; REFERENCE_

- Complete reference for all tool calls available in Zaguán Blade. - Add these to your Local AI system prompts to enable file operations, search, editor control, and command execution. + Reference for the regular tool calls that Zaguán Blade supports. + Add these to your Local AI system prompts to extend usability with file operations, search, editor control, and command execution.

NOTE @@ -356,6 +356,10 @@ import BaseLayout from '../layouts/BaseLayout.astro'; path size is_directory is_file modified readonly
+
+

Example

+
{ "path": "Cargo.toml" }
+
@@ -824,28 +828,19 @@ import BaseLayout from '../layouts/BaseLayout.astro';

Tool Result Handling

-

The 50KB / 2000 line limits apply only to tool results - what zblade sends back to the model after executing a tool (e.g., the output of read_file). These limits only apply in local mode, when the Zaguán Coder Daemon isn't handling storage.

+

Tool results are automatically truncated if they exceed limits:

50KB - Result max size + Max size
2000 - Result max lines + Max lines

When truncated, the first 100 lines and last 50 lines are shown with a truncation message.

- -
-

There are no size limits on incoming tool calls from the model. zblade will accept a write_file with any size content. The write_file handler itself has no caps - it writes whatever content string it receives directly to disk.

-
- -
- ℹ️ -

zblade includes dropped tool call detection. If a tool call from the model never arrives (e.g., streaming progress events complete but the final tool call with arguments is dropped server-side), zblade will catch this and surface a clear error.

-
@@ -885,24 +880,26 @@ import BaseLayout from '../layouts/BaseLayout.astro';

To use these tools with a local AI, include the tool definitions in your system prompt. See the Local AI System Prompts section for setup instructions.

- +
Example System Prompt Snippet - markdown + text
-
# Available Tools
+            
You have access to the following tools:
 
-**get_workspace_structure** - Get project directory tree
-**list_dir** - List files/directories in a path
-**read_file** - Read file contents
-**write_file** - Create or overwrite a file
-**apply_patch** - Replace specific content in a file (for edits)
-**grep_search** - Search for patterns across files
-**run_command** - Execute shell commands (use cwd parameter)
-**get_editor_state** - Get currently open file and cursor position
+- read_file: Read file contents. Args: {"path": "string"} +- write_file: Write to file. Args: {"path": "string", "content": "string"} +- grep_search: Search with regex. Args: {"pattern": "string", "path": "string"} +- apply_edit: Edit file. Args: {"path": "string", "old_text": "string", "new_text": "string"} +... + +To use a tool, respond with: +<tool_call> +{"name": "tool_name", "arguments": {...}} +</tool_call>
- +

The exact format depends on your AI provider's tool calling conventions.