Tool calling across model providers
Claude does tool calling natively through MCP. OpenAI does it through
the tools
array on chat completions. Ollama's /api/chat
endpoint doesn't really — agents tend to hallucinate tool names as prose.
I route every Ollama model through its
/v1/chat/completions
OpenAI-compatible endpoint so structured tool calls actually round-trip,
and added a fake-tool-call detector that catches inline JSON and rejects it.