Advanced
Tool use
Give Claude tools and functions to call — and design them so it calls them well.
Knowledge cards
Best practice
Describe Tools Like You'd Brief a New Hire
A tool-design principle for function calling: write each tool's description and parameter docs as if briefing a capable new hire who's never seen your system — what it does, when to use it (and when not), what each argument means, and what happens on failure — rather than a terse one-liner.
Best practice
Get Structured Output You Can Trust, Not Just JSON-Shaped Text
A practice for getting machine-readable output: define the exact schema you need, ask Claude to produce only that, and then validate the result against the schema in your code — treating the model's output as untrusted input to be checked, not as guaranteed-valid data.