Tools Documentation
Tools Documentation
Overview
Agent capability tools come from MCP servers (mcp.json). Core keeps a small set of
native tools for run control and memory/archive recovery. The ToolExecutor validates,
times out, and safely wraps all tool results.
Native tools
| Tool | When |
|---|---|
report_inability |
Always |
load_message |
app.message_archive_enabled |
load_tool_result |
[memory] + memory.enabled |
search_tool_results |
memory + memory.tool_result_search_enabled |
MCP tools
Loaded from mcp.json only. Names: mcp_{server}_{tool}. Lazy connect (stdio or HTTP).
See mcp.md and host_integrations.md.
Constraints
- JSON Schema validation — arguments must match schema
- Timeout —
app.default_tool_timeoutper tool (default 30s); MCP may override - Structured parsing — tool calls via
agents/tool_parser.py(no regex extraction) - Async execution — tools are async and return strings
- Safe errors — no stack traces to the LLM
Extension
Prefer adding capabilities as MCP servers in the host's mcp.json rather than
shipping new built-in tools in Core.
For a new native recovery/meta tool:
- Define a
Toolintools/ - Register in
agents/registry.py(or via memory/session stack) - Auto-grant in
AgentLoop._resolve_allowed_toolsif always available - Document in your host
prompt_files(or bundled templates if maintaining Core defaults) - Add tests
Tool call format
{"tool": "mcp_filesystem_read_file", "args": {"path": "test.txt"}}
Or plain text for the final answer (no JSON).