Claude interacts with your code via Tools (Function Calling). These are defined using the standard JSON Schema (Draft 2020-12). 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.
tool_choice ParameterBy 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"}