Mistral's function calling API enables models to invoke structured tools defined with JSON Schema. Learn the vocabulary for tool_choice modes, message roles (including the 'tool' role), parallel tool execution, and function definition structure for building reliable AI agents.
0 / 5 completed
1 / 5
A developer sends a Mistral chat request with tool_choice: 'any'. How does this differ from tool_choice: 'auto'?
With tool_choice: 'any', the model is forced to call at least one tool from the provided list. With tool_choice: 'auto', the model decides whether to call a tool or respond with plain text. Use any when you need guaranteed structured output via function calling.
2 / 5
After Mistral returns a tool_calls message, the developer must add the tool result to the conversation. Which role should the tool result message use?
Tool results must be submitted with the role tool (not function, which is an older OpenAI convention). The message must include tool_call_id matching the ID from the model's tool call, and content with the serialized result.
3 / 5
A Mistral function definition uses JSON Schema. Which field is required at the top level of the parameters object?
The parameters field must be a JSON Schema object with "type": "object" at the top level. Mistral validates that parameter schemas conform to this structure. The properties field then defines individual parameters, and required lists mandatory ones.
4 / 5
Mistral returns two tool_calls in a single assistant message. What does this indicate about how the engineer should handle them?
When Mistral returns multiple tool_calls in a single response, it signals that these calls are independent and can be executed in parallel. The developer should run all tool calls concurrently, then return all results in separate tool-role messages before the next model turn.
5 / 5
Which Mistral model was the first to natively support function calling, according to the official release timeline?
Mistral Small (formerly mistral-small-latest) was among the first Mistral models with native function calling support. mistral-7b-instruct-v0.1 did not support structured tool use. The capability was introduced and documented with the small/medium/large tier, with Mistral Large offering the most reliable tool use for complex schemas.