Comprehensive guide to implementing tool use with Claude, covering schema design, tool choice modes, multi-turn conversations, error handling patterns, and advanced features like extended thinking and strict schema conformance.
Control how Claude decides whether and how to use tools:
| "auto" | Claude decides to use tools or not (default) | General tool use, letting Claude decide | | "any" | Claude must use one tool but can choose which | Forcing tool use without specific tool | | "tool" | Force specific tool (e.g., {"type": "tool", "name": "getweather"}) | Structured JSON output, specific tool required |
Modelli di utilizzo degli strumenti per Claude tra cui progettazione dello schema, modalità tool_choice, gestione dei risultati, esecuzione parallela, recupero degli errori e integrazione del pensiero esteso. Fonte: lobbi-docs/claude.