Skip to Content

Tools

A “tool” is a function the agent can call inside the loop. Each tool has a JSONSchema definition, a category tag, and a Go handler. This page is the conceptual overview — for hands-on usage see the per-category guides.

How tools fit into the loop

Tools are resolved at the start of each turn, sent to the LLM as function definitions, and executed by the runner when the model emits a tool call. See Agent Loop for the full cycle.

The catalogue is assembled at startup: each builtin tool is registered in order and stamped with its semantic category. Memory tools are wired in separately, per surface.

Categories at a glance

CategoryExamplesWhat they do
Systemexecute_command, shell_tasks, shell_kill, write_file, open_file, download_fileRun commands and write to the local filesystem
FileReadread_file, grep, glob, list_dirRead and search the local filesystem
Logsread_logsTail the daemon log with filtering
Remoteconnect, connect_session, ask_machine, ask_machine_stream, ask_machinesReach other machines
Boardissue_list, issue_get, issue_create, issue_update, issue_closeCRUD over the issue board
Metatodo_write, skill_list, skill_run, delegate_task, task_statusSelf-management and delegation
HelphelpRead-only help registry
Permissionspermissions_helperIntrospect the permission policy
Researchweb_search, web_fetchRouted through the model gateway; only present if SDKROUTER_API_KEY is set
Gengenerate_parserGenerate CSS/XPath/regex selectors

The full list with parameters and usage notes lives in the per-category guides.

System tools

The most-used tools the agent reaches for first.

ToolParamsNotes
execute_command{command: string}Stream-based PTY. Floor-checked for unsafe patterns.
shell_tasks{id?, action: start | stop | status, command?}Long-running background tasks tracked across turns.
shell_kill{id: string}Clean SIGTERM + SIGKILL fallback.
write_file{path: string, content: string}Floor-checked path; atomic write via temp + rename.
open_file{path: string}Renders in Desktop. No-op in CLI / SDK.
download_file{url: string, path: string}Chunked; floor-checks the target path.

FileRead tools

ToolParamsNotes
read_file{path, offset?, limit?}Line-numbered output, 64 KiB cap, binary detection.
grep{path, pattern, mode: files | content | count, -i?, -n?, -A/-B/-C?}Ripgrep-backed, 10 s timeout, respects .gitignore.
glob{path, glob}Ripgrep-backed pattern match, ~1000-file limit.
list_dir{path, recursive?}Shallow or recursive listing, 10k-file cap.

Remote tools

The cross-machine surface — see Agent Communication for the full story.

ToolPurpose
connectDispatcher: list, exec, whoami, share, … on a target machine.
connect_sessionPersistent multi-command session on a target. See Remote Sessions.
ask_machineSingle remote agent call, unary.
ask_machine_streamSingle remote agent call, streamed.
ask_machinesFan-out to many agents in parallel.

Meta tools

ToolPurpose
todo_writeReplace the visible task list. Mirrors to the Board if CMDOP_TODO_PERSIST=on and a parent issue is set.
skill_listEnumerate installed skills.
skill_runRun a skill in a sub-session with full tool access.
delegate_taskSpawn a subagent with the parent’s model provider (or the model gateway as fallback).
task_statusQuery a subagent’s state and output snippet.

Permissions and the floor

Every tool call from a remote agent passes through the gate. The gate consults the non-bypassable floor first, then rules, then mode default. See Permissions.

Local chat (cmdop chat, TUI, SDK on the same OAuth identity) does not go through the gate by design — the floor still applies (it is a code-level safety net), but rule and mode gating is skipped.

Tool definitions and JSONSchema

Each tool ships a name, a description, and a JSONSchema describing its parameters. The runner presents these to the LLM as function definitions on every turn.

{ "name": "read_file", "description": "Read a file with pagination.", "schema": { "...": "JSONSchema for the parameters" } }

To add a tool you ship a new daemon binary that registers it in the builtin catalogue following the same pattern the existing tools use.

Conditional tools

web_search and web_fetch are only registered when SDKROUTER_API_KEY is set. generate_parser is wired through the parser package and may also be conditional. If the agent says “I don’t have a web tool”, check the env var first.

Cache discipline

Tool definitions are part of the static system prefix that providers cache. Adding or removing tools mid-session invalidates the cache for that session — try not to flip optional tools on and off during a single conversation.

Tools are not user-extensible at runtime. To add a tool you ship a new daemon binary. For one-off integrations use Skills instead.