# Tool calls

Let the model request bounded application functions.

## Application-executed functions

Declare the tool name, description and JSON input schema. The model returns a tool call; your application validates arguments and authorizes execution. The model itself does not gain credentials or permission to run arbitrary code.

## Continue the loop

Return a result associated with the correct tool-call id, then request the next model turn. Treat malformed arguments, tool failure and user cancellation as explicit states. Bound tool rounds and concurrent calls.

## Endpoint-specific verification

Chat tools, Messages tool_use/tool_result and Responses function-call items have distinct wire formats. Local protocol tests do not prove that every SDK or third-party agent works in production.
