> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dari.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Tool Calls

> Send OpenAI-style tools through a router.

Add standard `tools` and `tool_choice` fields to a Chat Completions request:

```json theme={null}
{
  "model": "dari/routing",
  "messages": [{"role": "user", "content": "What is the weather?"}],
  "tools": [
    {
      "type": "function",
      "function": {
        "name": "get_weather",
        "parameters": {"type": "object", "properties": {}}
      }
    }
  ]
}
```

If the selected model calls a tool, its assistant message contains `tool_calls`. Run the tool, append its result as a `tool` message, and send the full message history again.
