The @langchain/anthropic package provides built-in tools for the Anthropic API via the tools export. These tools enable Claude to access capabilities like web search, code execution, computer use, text editing, and more.
import { ChatAnthropic, tools } from "@langchain/anthropic";
Server tools are hosted by Anthropic — no execute callback needed.
| Tool | Function | Beta Header | Description |
|---|---|---|---|
| Web Search | tools.webSearch_20250305() |
— | Real-time web search with automatic source citations. Supports domain filtering and user location. |
| Web Fetch | tools.webFetch_20250910() |
web-fetch-2025-09-10 |
Fetch full content from web pages and PDFs. Supports domain filtering and optional citations. |
| Code Execution | tools.codeExecution_20250825() |
code-execution-2025-08-25 |
Run Bash commands and manipulate files in a secure, sandboxed environment. |
| Tool Search (Regex) | tools.toolSearchRegex_20251119() |
advanced-tool-use-2025-11-20 |
Regex-based tool discovery for large tool sets using Python re.search() syntax. |
| Tool Search (BM25) | tools.toolSearchBM25_20251119() |
advanced-tool-use-2025-11-20 |
Natural language tool discovery for large tool sets using BM25 ranking. |
| MCP Toolset | tools.mcpToolset_20251120() |
mcp-client-2025-11-20 |
Connect to remote MCP servers without implementing a separate MCP client. Supports per-tool configuration. |
Dynamic tools require an execute callback — your code handles execution while Claude provides instructions.
| Tool | Function | Description |
|---|---|---|
| Text Editor | tools.textEditor_20250728() |
View and modify text files. Commands: view, str_replace, create, insert. |
| Bash | tools.bash_20250124() |
Shell command execution in a persistent bash session with session restart support. |
| Memory | tools.memory_20250818() |
Store and retrieve information across conversations via a memory file directory. Commands: view, create, str_replace, insert, delete, rename. |
| Computer Use (Opus 4.5) | tools.computer_20251124() |
Desktop automation with screenshot, mouse, keyboard, and zoom support. Beta: computer-use-2025-11-24. |
| Computer Use | tools.computer_20250124() |
Desktop automation with screenshot, mouse, and keyboard support. Beta: computer-use-2025-01-24. Models: Claude Sonnet 4.5, Haiku 4.5, Opus 4.1, Sonnet 4, Opus 4, Sonnet 3.7. |
Options for the web search tool.
Options for the web fetch tool.
Options for the code execution tool.
Options for the tool search tool.
Options for creating an MCP toolset.
Options for the text editor tool (Claude 4.x version).
Options for the bash tool.
Options for creating a memory tool.
Options for the computer use tool (Claude Opus 4.5 only version).
Options for the computer use tool.