How tool calls work
User sends a message
The agent receives the user’s request and reasons about what actions are needed.
Docker Agent executes the tool
The runtime executes the tool and returns the result. By default, tools with side effects (writes, shell commands) require user confirmation first.
Toolsets
Tools are grouped into toolsets — an array of tool configurations on each agent. Each toolset has atype that determines which tools are loaded:
agent.yaml
Toolset fields
The toolset type. Determines which tools are loaded. See built-in toolsets and MCP toolsets.
Extra guidance added to the agent’s context about how and when to use tools in this toolset.
Restrict which individual tools within this toolset are available to the agent.
Override the model used for the turn that processes tool results from this toolset. Useful for per-toolset model routing.
Built-in toolsets
Docker Agent ships with built-in toolsets that require no external dependencies:| Toolset type | Description |
|---|---|
filesystem | Read, write, list, search, and navigate files and directories |
shell | Execute shell commands in the user’s environment |
think | Step-by-step reasoning scratchpad for planning and decision-making |
todo | Task list management for complex multi-step workflows |
memory | Persistent key-value storage backed by SQLite |
fetch | Make HTTP requests to external APIs and web services |
script | Define custom shell scripts as named tools |
lsp | Connect to Language Server Protocol servers for code intelligence |
api | Create custom tools that call HTTP APIs without writing code |
user_prompt | Ask users questions and collect interactive input |
transfer_task | Delegate tasks to sub-agents (auto-enabled with sub_agents) |
background_agents | Dispatch work to sub-agents concurrently |
handoff | Delegate tasks to remote agents via A2A |
a2a | Connect to remote agents via the Agent-to-Agent protocol |
Toolset-specific options
Some toolsets accept additional configuration fields:- memory
- todo
- fetch
- filesystem
- script
MCP toolsets
Docker Agent supports the Model Context Protocol (MCP) for connecting external tool servers. There are three ways to connect an MCP server:- Docker MCP (recommended)
- Local (stdio)
- Remote (SSE / HTTP)
Run MCP servers in Docker containers via the MCP Gateway. Browse the Docker MCP Catalog.This is the recommended approach — servers run isolated in containers and require no local installation.
Reusable MCP definitions
Define MCP servers once in the top-levelmcps section and reference them from multiple agents:
agent.yaml
Toolset instructions
Use theinstruction field to give the agent extra guidance about a specific toolset:
agent.yaml
Permissions
Control which tools are auto-approved, always require confirmation, or are blocked entirely:agent.yaml
deny first, then allow, then ask, then the default behavior (read-only tools auto-approved, others ask). Patterns support glob-style matching.
See Permissions for the full configuration reference.
Next steps
Built-in tools reference
Full reference for every built-in toolset.
Tool configuration
All toolset configuration options.
Permissions
Control tool approval behavior.
RAG
Add document retrieval to your agents.