Tool Use & Function Calling
What is the correct JSON schema format for Claude tool definitions?
QUICK ANSWER
Claude tool schemas follow the JSON Schema Draft 4 specification. Place descriptions on all properties to help Claude select the correct tool and generate matching parameters.
JSON Tool Definition Template
{
"name": "get_stock_price",
"description": "Retrieves the current trading stock price for a symbol.",
"input_schema": {
"type": "object",
"properties": {
"ticker": {
"type": "string",
"description": "The stock ticker symbol (e.g. AAPL)."
}
},
"required": ["ticker"]
}
}
Verified against: Anthropic API Tool Use v1