Expand description
Tools: the things an agent can actually do.
A tool is a name, a description, a JSON Schema, and an async function. The registry holds them; MCP servers and native Rust functions both land here as the same trait object, so the agent loop never learns the difference.
Modules§
- ask
- Asking the user a question, as a tool.
- builtin
- Built-in tools. No server required — these are ordinary Rust functions.
- recall
- Recall: search this conversation’s full recorded history.
- skill
- The
skilltool: level 2 of progressive disclosure. - todo
- A task list the agent maintains for itself.
Structs§
- Capabilities
- What a tool can do — the vocabulary MCP standardized (
readOnly,destructive,openWorld) plus the two axes that decide whether an agent can be turned into an exfiltration tool. - Carried
State - A tool’s own state, on its way across a compaction.
- Mode
Approver - Answers from the configured
PermissionModewithout asking anyone. - Registry
- ToolCtx
- What a tool is allowed to touch.
- Tool
Output
Enums§
- Decision
- The decision an approver hands back for one pending call.
Constants§
- SPILL_
FLOOR_ BYTES - Floor under a result’s share of the turn budget. A wide batch must not starve every result down to a marker with no content: below this, the division stops and the total budget is allowed to overrun instead.
Traits§
- Approver
- Gates tool calls that aren’t read-only. The CLI implements this with a terminal prompt; a headless caller can auto-allow or auto-deny.
- Tool
Functions§
- cap_
result - Cut an oversized tool result down to
capbytes, saving the full output where the model can get it back.