Tool calling
Updated 1 Nov 2026
What is a tool call?
Tool calling lets a model request an operation through a structured interface supplied by an application. A tool definition describes an operation, its purpose and the arguments it accepts. Instead of only producing prose, the model can return a tool request that the application interprets.
The model does not perform the operation merely by naming it. The application receives the request, checks it and decides whether to execute the corresponding code. It then supplies the result to the model when another generation step is needed. This separation makes responsibility for external actions explicit.
What happens in a request cycle?
First, the developer sends the available tool definitions with the conversation. The model may answer directly or propose a call containing a tool name and arguments. The application parses those arguments and checks them against the expected schema and the current user's permissions.
After executing an allowed operation, the application adds the tool result to the conversation with the identifier that connects it to the request. A subsequent model call can use that result to produce an answer or request another step. Preserve this relationship so the conversation remains understandable to the model and to the software handling it.
IndicStack's documentation includes a tool-calling example for Qwen3.8 27B. Use the example to understand the message flow, then replace its application function with a narrowly scoped operation suitable for your product.
What should be validated?
Treat proposed arguments as untrusted input. A model can misunderstand a request, invent an identifier or choose an operation that does not fit the user's intent. Validate types, allowed values and resource access in application code. A tool description helps guide the model; it is not an access-control mechanism.
Use bounded execution: set limits on repeated steps, handle tool errors and decide what information is safe to return to the conversation. For actions with external consequences, place the required approval in the application workflow.
Evaluate both successful and unsuccessful paths. Include missing records, invalid arguments and unavailable tools in your tests. Tool calling is useful when it connects a model to reliable application functions, while keeping permissions, validation and execution under the application's control.
Related terms
Tool calling in your application.
Review the relevant API capabilities and integration details for your application.