
Claude Tool Use: Function Calling With the API
Claude tool use (function calling) lets Claude call tools you define via a JSON schema. The tool_use and tool_result loop, a worked example, and how it ties to MCP.
Category
Working with the Claude API — the endpoints, parameters, and patterns to send your first request and scale it without surprises.
These guides cover the Claude API from the builder's seat: we call it daily for this site, so the notes on requests, tokens, and errors come from real usage, not just the reference. The focus is on getting a reliable request working and then hardening it — handling rate limits, retries, and cost — before it reaches production.
Start here if you're wiring Claude into your own app, and pair it with the developer guides for the deeper mechanics. The aim is a clean path from first call to dependable pipeline, with the gotchas flagged up front.

Claude tool use (function calling) lets Claude call tools you define via a JSON schema. The tool_use and tool_result loop, a worked example, and how it ties to MCP.

Claude prompt caching stores a stable prompt prefix so cached reads bill at ~10% of input price — how cache_control works, the TTLs, and the gotchas.

Claude API pricing per million tokens: Opus 4.8, Sonnet and Haiku rates, batch's 50% cut, prompt caching, and worked cost examples.

Learn how to use Claude API: get an API key from the Anthropic Console, understand the Messages API, and make your first request in curl or Python.

Claude API error 500 from api.anthropic.com: what api_error and 529 mean, exponential backoff with jitter, retry caps and request_id logging.