Quick Reference: Tool Schema ​
Updated: 2026-05-26
Anthropic-Schema Tools ​
| Tool | Name | Execution | Description |
|---|---|---|---|
| Bash | bash | Client | Run shell commands |
| Text Editor | text_editor | Client | Read, write, edit files |
| Computer Use | computer | Client | Control browser/desktop |
| Memory | memory | Client | Manage scratchpad memory |
| Web Search | web_search | Server | Search the web |
| Web Fetch | web_fetch | Server | Fetch URL content |
| Code Execution | code_execution | Server | Run Python code |
| Tool Search | tool_search | Server | Search available tools |
User-Defined Tool Schema ​
json
{
"name": "my_tool",
"description": "What this tool does",
"input_schema": {
"type": "object",
"properties": {
"param1": {
"type": "string",
"description": "First parameter"
},
"param2": {
"type": "integer",
"description": "Second parameter"
}
},
"required": ["param1"]
}
}Response Format ​
Tool Use Block (from Claude) ​
json
{
"type": "tool_use",
"id": "toolu_01ABC123",
"name": "my_tool",
"input": {
"param1": "value",
"param2": 42
}
}Tool Result Block (from your app) ​
json
{
"type": "tool_result",
"tool_use_id": "toolu_01ABC123",
"content": "Result text or array"
}Gotchas ​
| Issue | Fix |
|---|---|
| Missing tool_use ID | Always extract id from the tool_use block |
| Wrong ID in result | tool_use_id must match exactly |
| Multiple tools | Claude can call several tools in one response |
| Error in tool | Return the error message as tool_result content |
| Long results | Large outputs count against context window |