Tools & MCP
Tools are loaded per request for the calling user; the model only sees those enabled in the request.

Tool sources
- Local tools (
LocalToolspec):brainstorm,simplify,canvas_write,canvas_edit,canvas_read. - MCP tools (
McpLoader): metadata cached per user (with a Valkey distributed lock), connection rebuilt per request; forwards the user token only when the source enablesforward_token(default: off). MCP servers speak SSE or streamable HTTP; the Valkey cache key ismcp_tools_raw_v3:<user>with a 12 h TTL (60 s on failure). - Deep Agents built-ins:
write_todos,ls,read_file,write_file,edit_file,delete,glob,grep,execute,task— enabled per model through the harness profile.
Selection and approval
ToolCollection.get_tools(user) combines local tools (if configured) and MCP tools; a non-persisted chat drops tools that require approval. The frontend tool picker lists local + MCP metadata from GET /v1/tools, and the chat request carries enabled_tools. When enabled_tools is set, ContextMiddleware shows the model only the requested tools, the remaining tools of their groups (users select groups as a whole), the canvas base tools and the enabled built-ins. The chat router maps an omitted enabled_tools to an empty selection, so omitting the field offers only the built-ins and canvas base tools; the middleware's unfiltered None path is not exercised by chat requests. Tools with require_approval run in interrupt_on mode: the run pauses until the user approves.
Configuration (MCP sources, tool call budgets) is described in MCP; the tool spec pattern in the repository's agent/tools/README.md.