create_deep_agent via the tools= parameter alongside the built-in harness tools for planning, file management, and subagent spawning.
Custom tools
Pass any callable, such as plain functions, LangChain@tool-decorated functions, or tool dicts—directly to tools=.
Deep Agents infers the tool schema from the function signature and docstring, so you don’t need to define a separate schema in most cases.
StructuredTool, return types, error handling, and more), see Tools.
MCP tools
Deep Agents fully support Model Context Protocol (MCP), the open standard for connecting agents to external services. Load tools from any MCP server and pass them directly to
create_deep_agent.langchain-mcp-adapters to connect to MCP servers:
Built-in harness tools
In addition to the tools you provide, every Deep Agent comes with a built-in set of tools from the harness:| Tool | Description |
|---|---|
ls | List files in a directory |
read_file | Read file contents (with pagination and multimodal support) |
write_file | Create a new file, or overwrite an existing one |
edit_file | Perform exact string replacements in files |
glob | Find files matching a glob pattern |
grep | Search file contents |
execute | Run shell commands (sandbox backends only) |
task | Spawn a subagent to handle a delegated task |
write_todos | Manage a structured todo list |
write_file overwrites a file if it already exists, as of deepagents>=0.7.0a2. On earlier versions, write_file errors instead. Use edit_file to modify an existing file.Multimodal tool outputs
Custom tools can return plain text or standard content blocks (text, images, audio, video, and files) when the selected model supports multimodal tool results. The built-inread_file tool also returns multimodal blocks for supported non-text file types.
Return a string for text-only results, or an ordered list of content blocks for text plus media or interleaved multimodal output. See Multimodal and Tool return values for examples and context-compression considerations.
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

