ref~/zaguan-blade/TOOL_CALLS.mdreference
$cat TOOL_CALLS.md

Updated 2026-06-26

Tool calls,wired into your prompts.

Reference for the tool calls that Zaguán Blade's local executor supports. Add these to your Local AI system prompts for file operations, search, editor control, code intelligence, and command execution.

NOTEServer-side tools such as ask_followup_question, attempt_completion, new_task, generate_image, and todo_write are handled by Zaguán Coder Daemon and are not executed locally. This reference covers the local executor.

Server-Side Tools

Server-Side Tools

These are handled by Zaguán Coder Daemon and should not be executed by Blade's local executor:

ask_followup_questionattempt_completionnew_taskgenerate_imagetodo_write

If Blade receives one of these for local execution, it reports a protocol error.

Tool Result Limits

Tool Result Limits

Local tool output is truncated for large results before it is sent back to the model:

50KBMax size
2000Max lines

Truncation keeps a head and tail preview. read_many_files, grep_search, and several index tools also return their own count, truncation, health, or timing metadata.

Editor Context Tools

open_fileCONTROL

Request that the UI open a file.

Parameters

NameTypeDescription
pathrequired stringWorkspace path
lineoptional integerOptional target line
columnoptional integerOptional target column
goto_lineCONTROL

Request that the UI navigate to a line in the active file.

Parameters

NameTypeDescription
linerequired integer
columnoptional integer
get_selectionSELECTION

Returns current selection metadata from editor state when available.

Parameters

None

replace_selectionEDIT

Request replacement of the current editor selection.

Parameters

NameTypeDescription
textrequired string
insert_at_cursorEDIT

Request insertion at the current editor cursor.

Parameters

NameTypeDescription
textrequired string

File Read Tools

read_fileREAD

Reads a full file.

Parameters

NameTypeDescription
pathrequired stringfile_path, filepath, filename
read_file_rangeREAD

Reads a 1-indexed line range with optional surrounding context.

Parameters

NameTypeDescription
pathrequired stringaliases: file_path, filepath, filename
start_lineoptional integerDefaults to 1
end_lineoptional integerDefaults to end of file
context_linesoptional integerDefaults to 0
read_many_filesREAD

Reads many files matched by glob patterns and returns JSON with per-file content and summary metadata.

Parameters

NameTypeDescription
pathsrequired string[]aliases: globs, patterns; single aliases: path, pattern, glob
excludeoptional string[]alias: excludes
max_filesoptional integerdefault 100, cap 500
max_bytes_per_fileoptional integercap 512 KB
include_line_numbersoptional booleandefaults to true

File Write and Edit Tools

Writes and edits create history snapshots and update Blade's uncommitted-change tracking when executed inside the app.

write_fileWRITE

Writes content to a file, creating parent directories when needed.

Aliases: write_file_validated, create_file, write_to_file

Parameters

NameTypeDescription
pathrequired stringfile_path, filepath, filename
contentrequired stringcontents, text, data
edit_fileEDITLEGACY

Legacy single search/replace edit.

Parameters

NameTypeDescription
pathrequired stringfile_path, filepath, filename
old_contentrequired stringold, from
new_contentrequired stringnew, to

Filesystem Tools

create_directoryCREATE

Creates a directory and missing parents.

Parameters

NameTypeDescription
pathrequired string
delete_fileDELETEDELETE

Deletes a file. Deletes a directory only when recursive: true.

Parameters

NameTypeDescription
pathrequired string
recursiveoptional boolean
move_fileMOVE

Moves or renames a file.

Parameters

NameTypeDescription
sourcerequired string
destinationrequired string
copy_fileCOPY

Copies a file or recursively copies a directory.

Parameters

NameTypeDescription
sourcerequired string
destinationrequired string
get_file_infoINFO

Returns JSON metadata: path, size, is_directory, is_file, modified timestamp, and readonly flag.

Parameters

NameTypeDescription
pathrequired string

Code Intelligence Tools

symbol_searchSYMBOLS

Searches indexed symbols by name or qualified name. Results include code definitions plus partial scanner symbols such as CSS selectors/custom properties, markup class/id selectors, and JSON/YAML/TOML config key paths.

Parameters

NameTypeDescription
queryrequired string
pathoptional stringfile, file_path
file_patternoptional stringcomma-separated file path glob or substring filter; alias path_pattern
name_patternoptional stringcomma-separated symbol-name glob or substring filter
qualified_name_patternoptional stringcomma-separated qualified-name glob or substring filter; alias qualified_pattern
kindoptional stringsymbol_type
limitoptional integercap 100
offsetoptional integerzero-based pagination offset; cap 1000
include_connectedoptional booleancompact one-hop connected-symbol preview for returned results; use symbol_references for one-hop expansion or symbol_trace for bounded multi-hop traversal
ℹ️

Responses include _meta.language_support, _meta.search_health, _meta.index_health, _meta.filters, and pagination fields such as _meta.offset, _meta.limit, _meta.has_more, and _meta.total_lower_bound. Empty results should only be treated as trustworthy when language support says the relevant file type is supported and the index is fresh enough for the task. Pagination totals are lower-bound counts over the bounded candidate set, not an expensive exact workspace-wide total.

semantic_anchor_searchANCHORS

Searches indexed semantic anchors such as command names, event names, route-like strings, config keys, translation keys/text, and CSS/theme tokens. Use this for literals and anchors when structural symbol support is absent, shallow, or too narrow for the question.

Parameters

NameTypeDescription
queryrequired string
pathoptional stringfile, file_path
limitoptional integercap 100
symbol_resolveRESOLVE

Resolves a symbol by stable ID or by name within a file.

Parameters

NameTypeDescription
symbol_idoptional stringid
pathoptional stringfile, file_path
qualified_nameoptional string
nameoptional string
symbol_outlineOUTLINE

Returns a compact symbol inventory and optional hierarchy for one file. Unsupported files return explicit diagnostics instead of silently implying that no symbols exist. Partial scanner languages report shallow support in _meta.language_support.

Parameters

NameTypeDescription
pathrequired stringfile, file_path
max_symbolsoptional integerlimit; default 120, cap 300
include_outlineoptional booleandefaults to false; returns compact nodes only
max_outline_nodesoptional integeroutline_limit; default 120, cap 500
max_outline_depthoptional integeroutline_depth; default 4, cap 12
include_docstringsoptional booleaninclude_docs; defaults to false; docstrings are truncated when included
ℹ️

Response metadata includes _meta.language_support, _meta.line_count when the file index has stored line-count metadata, plus truncation fields such as _meta.symbols_truncated and _meta.outline_truncated.

symbol_relatedRELATED

Returns symbols related to a seed symbol. Results can include structural graph relationships, same-module/module-import context, and bounded lexical-similarity fallbacks. Each related item includes evidence; lexical-similarity results are labeled as structural: false and confidence: heuristic, so they should be treated as navigation hints rather than graph truth.

Parameters

NameTypeDescription
symbol_id` / `idoptional string
path` / `file` / `file_pathoptional string
qualified_nameoptional string
nameoptional string
limitoptional integer
symbol_referencesREFERENCES

Finds semantic usages of one symbol. Use after symbol_search or symbol_resolve for where-used, callers, references, or impact questions.

Parameters

NameTypeDescription
symbol_id` / `idoptional string
path` / `file` / `file_pathoptional string
qualified_nameoptional string
nameoptional string
relationshipoptional string
relationshipsoptional string[]
limitoptional integer
max_symbolsoptional integer
ℹ️

Relationship types include call, import, export, extends, implements, and contains.

symbol_graphGRAPH

Returns one-hop incoming and outgoing graph edges for one symbol.

Parameters

NameTypeDescription
symbol_id` / `idoptional string
path` / `file` / `file_pathoptional string
qualified_nameoptional string
nameoptional string
relationshipoptional string
relationship_typeoptional string
kindoptional string
limitoptional integer
symbol_traceTRACE

Traces bounded multi-hop incoming and/or outgoing symbol relationships from one seed symbol. This is a structural index traversal, not a type-aware call graph. Responses include visited symbols, edges, hop depth, truncation status, and unresolved edge counts.

Parameters

NameTypeDescription
symbol_id` / `idoptional string
path` / `file` / `file_pathoptional string
qualified_nameoptional string
nameoptional string
directionoptional stringincoming, outgoing, or both; defaults to both
relationshipoptional string
relationshipsoptional string[]
symbol_schemaSCHEMA

Returns compact Symbols Index coverage and schema counts. Use this before trusting broad searches, investigating empty search results, or deciding whether a language/file type has enough indexed coverage.

Parameters

NameTypeDescription
path` / `file` / `file_pathoptional string
symbol_id` / `idoptional string
qualified_nameoptional string
nameoptional string
limitoptional integer
max_symbolsoptional integer
ℹ️

Response includes indexed file counts by extension, language, and support level; symbol counts by type; relationship integrity stats including unresolved targets; semantic anchor counts by kind; _meta.index_health; and _meta.language_support. When scoped with path, responses include root-vs-scoped totals under schema.scope and _meta.scope.

edit_impactIMPACT

Analyzes likely impact before editing a file or symbol. Returns impacted files, likely tests, reference counts, risk, confidence, and suggested read ranges.

Parameters

NameTypeDescription
path` / `file` / `file_pathoptional string
symbol_id` / `idoptional string
qualified_nameoptional string
nameoptional string
limitoptional integer
max_symbolsoptional integer

Composite Tools

codebase_investigatorCOMPOSITE

Runs a bounded read-only investigation and returns structured findings with evidence references.

Parameters

NameTypeDescription
objectiverequired string
scopeoptional string[]
max_turnsoptional integer
max_tool_callsoptional integer
output_formatoptional string
cancel_after_msoptional integer

Project Index Fallback Tools

get_project_index_overviewINDEX

Returns a bounded overview of .zblade/context/project_index.md.

Parameters

NameTypeDescription
pathoptional string
max_charsoptional integerdefault 6000, cap 12000
get_project_index_chunkINDEX

Returns a character window from .zblade/context/project_index.md.

Parameters

NameTypeDescription
pathoptional string
offsetoptional integerdefault 0
max_charsoptional integerdefault 4000, cap 8000

Command Tool

command_sessionTERMINAL

Interacts with a background command started by run_command(background: true): poll for new output (default), write to its stdin, send Ctrl-C, or force-kill it. Non-gated inline tool — no approval is needed because the underlying command was approved when it started.

Parameters

NameTypeDescription
session_idrequired stringthe session_id returned by a backgrounded run_command
inputoptional stringbytes written to the process stdin; empty (default) = poll only; the ETX byte (U+0003) sends Ctrl-C, and the literal spellings \x03, \u0003, and ^C are normalized to it
killoptional booleanforce-kill the process, then return its final output; default false
wait_msoptional integerhow long to wait for new output before returning; default 3000, clamped 250..30000

Behavior

  • Polls return only the output delta since the last poll, ANSI-stripped, with wall time and run/exit status. Returns early as soon as any new output arrives or the process exits.
  • A stdin write to a process that already exited is not an error: the tool falls through to a poll and reports the exit and final tail instead.
  • Unknown session IDs return an error (sessions may have been evicted or reaped — see the run_command background notes).