Tools
Tools give agents the ability to interact with the world — read files, run commands, search the web, query databases, and more.
How Tools Work
When an agent needs to perform an action, it makes a tool call. The docker-agent runtime executes the tool and returns the result to the agent, which can then use it to continue its work.
- Agent receives a user message
- Agent decides it needs to use a tool (e.g., read a file)
- docker-agent executes the tool and returns the result
- Agent incorporates the result and responds
By default, docker-agent asks for user confirmation before executing tools that have side effects (shell commands, file writes). Use --yolo to auto-approve all tool calls.
Built-in Tools
docker-agent ships with several built-in tools that require no external dependencies. Each is enabled by adding its type to the agent’s toolsets list:
| Tool | Description |
|---|---|
| Filesystem | Read, write, list, search, and navigate files and directories |
| Shell | Execute arbitrary 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 |
MCP Tools
docker-agent supports the Model Context Protocol (MCP) for extending agents with external tools. There are three ways to connect MCP tools:
- Docker MCP (recommended) — Run MCP servers in Docker containers via the MCP Gateway. Browse the Docker MCP Catalog.
- Local MCP (stdio) — Run MCP servers as local processes communicating over stdin/stdout.
- Remote MCP (SSE / HTTP) — Connect to MCP servers running on a network. See Remote MCP Servers.
toolsets:
- type: mcp
ref: docker:duckduckgo
See Tool Config for full MCP configuration reference.
For full configuration reference, see Tool Config. For RAG (document retrieval), see RAG.