Tool Use with Claude
Step-by-step: define tools → send to Claude → handle tool_use → return results.
Step 1: Define Tools
tools = [{
"name": "query_database",
"description": "Run a SQL query on the customer database. Use for revenue, account, or usage data.",
"input_schema": {
"type": "object",
"properties": {
"query": {"type": "string", "description": "SQL query"},
"limit": {"type": "integer", "default": 10}
},
"required": ["query"]
}
}]
Step 2: Handle Tool Calls
Continue Reading
This topic continues with more in-depth content, code examples, and diagrams. Sign up free to unlock the full guide with all 87 sections.
Sign Up Free to UnlockFree access · No credit card required