[ ABORT TO HUD ]
SEQ. 1
SEQ. 2

Defining Schemas & Forcing Execution

🔧 Advanced Tool Use20 min500 BASE XP

Building the Tool Socket

Claude interacts with your code via Tools (Function Calling). These are defined using standard JSON Schema. Precise descriptions in the input_schema are critical; they aren't just for developers-the model uses these descriptions as 'instructions' to understand when and how to call the tool.

The tool_choice Parameter

By default (auto), Claude decides when to use a tool. For deterministic pipelines, you can override this logic:

  • auto: Model decides probabilistic selection.
  • any: Forces Claude to use at least one tool from your list.
  • tool: Forces Claude to use a specific tool ID immediately.
// Forcing a specific tool
"tool_choice": {"type": "tool", "name": "get_weather"}
SYNAPSE VERIFICATION
QUERY 1 // 2
How does the 'input_schema' assist the model's reasoning?
It provides the executable code
It mathematically binds Claude's weights to output types that map to your code's requirements
It displays a UI block
It parses TypeScript