CoreLayer Docs
Core Concepts

Tool Registry

How native tools, MCP tools, and discovered tools reach the model.

The Tool Registry is the catalog every tool call resolves through. It aggregates native tools and MCP-provided tools, and it is the place where a tool's risk level is declared.

Sources

SourceDescriptionID form
NativeTools implemented in the tool runtimenative:<name>
MCPTools reported by a connected MCP servermcp:<serverId>:<toolName>

Declared risk, not inferred risk

Every native tool is registered with an explicit risk level:

registerTool("dispatch_agent", tool({ ... }), "high");

This is a deliberate constraint. Inferring risk from the tool name once rated dispatch_agent and run_task_graph as low — they contain no risky-sounding word — while both spawn runs that write files and execute commands, and low is auto-approved by default. A name is not evidence about an effect.

Core tools and on-demand discovery

Exposing every tool schema on every turn burns context and degrades tool selection. The router therefore works in two tiers:

  1. Core tools are always available.
  2. Everything else is reachable through search_tools, which matches the full catalog by query and returns schemas for the matches. The model plans with the tools it found rather than carrying the whole catalog.

Built-in native tools

ToolRiskPurpose
get_code_skeletonlowAST-pruned skeleton of a file or symbol — signatures and types preserved, bodies collapsed
search_toolslowDiscover tools outside the core set
listConversationslowList conversations
previewConversationCleanuplowDry-run a cleanup query
taskflow_create_taskmediumCreate a task
taskflow_list_taskslowList tasks
deleteConversationhighDelete one conversation
deleteConversationsByQueryhighBulk delete by query
requestConversationCleanuphighCleanup behind an approval
dispatch_agenthighDelegate a bounded run to a child agent
run_task_graphhighExecute a DAG of coding sub-tasks
createTask / updateTaskmediumTask management
getTodayTasks / queryTaskslowQuery tasks
deleteTaskhighDelete a task
addArticle / updateReadingStatusmediumReading list
getReadingList / getReadingStats / recommendNextlowReading queries
getDailySummary / getWeeklyStats / getReviewHistorylowReview queries
saveReviewmediumPersist a review
memory_storemediumWrite a long-term memory (persistent influence, so not low)
memory_search / memory_listlowRead memories
memory_deletehighDelete a memory

Every native tool declares its risk at registration; none of them rely on name or argument inference.

MCP tools carry the risk policy configured for their server (riskPolicy per level) and are registered on connect.

Resolution

Model requests tool "search_tools"
  → registry resolves native:search_tools
  → Permission Guard reads the declared risk
  → policy decides auto / notify / confirm / deny
  → execute, audit, return

Resolution accepts both the bare name and the native: prefix, so the model does not need to know the namespacing.

Inspecting the registry

  • GET /api/tools — list registered tools
  • GET /api/tools/:id — one tool
  • POST /api/tools/filter — filter by source or risk
  • POST /api/tools/:id/execute — execute directly (still permission-checked)
  • GET /api/tools/logs — recent call log

Next Steps

On this page