Built-in Tools
The Anvio tool gateway — 73 built-in tools with a permissions matrix, prefixed anvio_tools__*, configured per workspace.
5 min read
Anvio ships a built-in tool gateway (@anvio/tools) so agents get useful tools without any external MCP setup. Every built-in tool is namespaced anvio_tools__<name> and gated by workspace/tools/gateway.yaml.
ToolGateway
ToolGateway (packages/tools/src/gateway.ts) loads workspace/tools/gateway.yaml, falling back to DEFAULT_TOOL_GATEWAY_YAML if the file doesn't exist yet:
export class ToolGateway {
static async load(workspaceRoot: string, ctx?: BuiltinToolContext): Promise<ToolGateway> { /* ... */ }
listTools(): string[] {
if (!this.spec.enabled) return [];
return Object.entries(this.spec.tools)
.filter(([, cfg]) => cfg.enabled)
.map((name) => `anvio_tools__${name}`);
}
getModelToolDefinitions(): ModelToolDefinition[] {
return buildModelToolDefinitions(this.listTools());
}
async call(call: BuiltinToolCall, ctx?: ToolGatewayCallContext): Promise<BuiltinToolResult> { /* ... */ }
}getModelToolDefinitions() turns the enabled tool list into native tool_use definitions for the model provider — this is how a model actually sees which tools it can call.
Catalog (73 tools)
Grouped by the same categories the gateway config uses. Enabled-by-default status reflects DEFAULT_TOOL_GATEWAY_YAML.
Web & file (15)
| Tool | Default | Notes |
|---|---|---|
web_fetch | on | Fetch a URL |
web_search | off | Requires WEB_SEARCH_API_KEY (Brave by default) |
web_extract | on | Extract URL → markdown |
http_request | on | Generic HTTP request |
file_read | on | Read with line numbers |
file_write | off | Overwrite a file |
edit_file | off | Find/replace edit |
patch_file | off | Fuzzy find/replace + diff |
append_file | off | Append to a file |
file_delete | off | Delete a file |
glob_files | on | Glob pattern search |
grep_search | on | Ripgrep-style content search |
search_files | on | Search by name or content |
list_dir | on | List a directory |
path_exists | on | Check path existence |
Terminal & code (5)
| Tool | Default | Notes |
|---|---|---|
run_shell | off | Requires a CodeExecutor |
terminal | off | Shell execution, optional background |
process | off | Poll/kill/log a background process |
execute_code | off | JS by default; delegates to CodeExecutor if provided |
execute_code_pipeline | — | Multi-step code execution pipeline |
Browser — Playwright session (12)
browser (legacy single-action tool) plus a full session-based set: browser_navigate, browser_snapshot, browser_click, browser_type, browser_scroll, browser_back, browser_press, browser_console, browser_get_images, browser_vision, browser_dialog, browser_cdp. All off by default. browser_cdp additionally requires ANVIO_BROWSER_CDP_GRANT=1 for its extended raw CDP methods.
Media & vision (5)
| Tool | Default | Notes |
|---|---|---|
image_generate | off | |
text_to_speech | off | |
vision_analyze | off | Multimodal image analysis |
video_analyze | off | Extracts a frame via ffmpeg (FFMPEG_BINARY to override), then runs vision analysis |
video_generate | off | Delegates to an MCP video-gen preset; ANVIO_VIDEO_MOCK=1 for dev/test |
Agent orchestration (9)
todo (on), clarify (on), session_search (on), memory_recall (on), delegate_task (off — subagent delegation), cronjob (off), skills_list (on), skill_view (on), skill_manage (off), send_message (off), mixture_of_agents (off).
Kanban (9)
kanban_list, kanban_show, kanban_create, kanban_move, kanban_complete, kanban_block, kanban_unblock, kanban_heartbeat, kanban_comment, kanban_link — all off by default, backed by @anvio/kanban.
Home Assistant (4)
ha_list_entities, ha_get_state, ha_list_services, ha_call_service — REST-backed, off by default.
Niche / platform integrations (8)
x_search, computer_use, discord_admin, spotify_search, feishu_doc_read, rl_tool (Tinker-Atropos RL), yb_tool (Yuanbao action bundle), honcho_tool (Honcho memory context/profile/search/conclude) — off by default, most delegate to an MCP preset via ctx.callMcpTool.
Utility (2)
json_parse, datetime_now — on by default, no external dependency.
computer_use is a permanent stub on this platform — it requires the macOS Accessibility API and cannot run in a headless Linux environment. See docs/69-post-v1.17-gap-register.md, item T1e.
Configuration (workspace/tools/gateway.yaml)
apiVersion: anvio.io/v1
kind: ToolGateway
metadata:
name: default
spec:
enabled: true
tools:
web_fetch:
enabled: true
execute_code:
enabled: false
run_shell:
enabled: false
# ... one entry per tool, see DEFAULT_TOOL_GATEWAY_YAML in @anvio/tools
webSearch:
provider: brave
apiKeyEnv: WEB_SEARCH_API_KEYEnable write/exec/browser/kanban tools explicitly — they default to enabled: false because they can modify the filesystem, run arbitrary shell commands, or drive a browser session.
CLI
anvio tools list
anvio tools test anvio_tools__web_extract https://example.com
anvio tools test anvio_tools__search_files '{"pattern":"tool","target":"content"}'Dispatch and error shape
Every tool call runs through a single switch in runBuiltinTool() (packages/tools/src/builtins/index.ts) and returns a BuiltinToolResult:
interface BuiltinToolResult {
name: string;
output: unknown;
status: 'completed' | 'failed' | 'skipped';
error?: string;
}status: 'skipped' means the tool (or the whole gateway) is disabled in config, or a required dependency like workspaceRoot or codeExecutor wasn't supplied to the context — distinct from 'failed', which means the tool ran and threw. See Error Handling for the full convention.
Permissions, approval, and audit
Per docs/08-tools.md, the tool runtime layer adds a permissions matrix, an approval workflow (tools that need human sign-off pause the agent at awaiting_approval), and audit logging.
Not yet shipped
Rate limiting and full sandboxing for built-in tool execution are listed in docs/08-tools.md as a later phase and are not fully implemented for every tool category — code execution has real timeout/memory limits via CodeExecutor (see Docker Runtime), but there is no general per-tool rate limiter yet.
Last updated on