AIToday
Large Language ModelsAI Coding AssistantsZenn AI/MLPublished: Nov 4, 2026, 06:00 JST

Tool definitions differ across OpenAI, Anthropic, Gemini: get.weather only works in Gemini

Send on LINE
Tool definitions differ across OpenAI, Anthropic, Gemini: get.weather only works in Gemini

3 Key Points

  1. What happened

    A Zenn guide comparing OpenAI, Anthropic and Gemini tool-calling APIs found the same name-description-schema content is nested differently in each API, and naming rules diverge — only Gemini accepts dots, so a name like get.weather fails elsewhere.

  2. Why it matters

    Developers moving a single tool definition from one provider to another can hit name-based rejections before any request is even sent, the guide suggests — a portability snag for teams planning multi-vendor support.

Not sure about something? Ask the AI

Questions and answers are published on this page.

Summaries like this, every morning.

Context & Analysis

The guide lays out how tool calling works: the model returns a request to run a function with specific arguments, and your own code executes it. What changes between vendors is only the packaging of that request — where the name, description and argument schema sit, and which characters a name may contain. OpenAI's two endpoints already differ from each other, with Chat Completions nesting fields under function and Responses placing them at the same level, while Anthropic renames the schema field to input_schema and Gemini gathers declarations under functionDeclarations.

The guide also flags pre-send traps. OpenAI's strict mode requires additionalProperties set to false and every property listed as required, and the default for strict differs between Chat Completions and Responses. Anthropic rejects the whole request with a 400 error if even one input_examples sample does not match the tool's own schema, and those samples add prompt tokens — roughly 20–50 for simple ones and 100–200 for deeply nested shapes. Gemini forbids specifying parameters and parametersJsonSchema at the same time.

On the local side, Ollama labels each model with capabilities such as tools, thinking, vision and embedding, and only models bearing the tools label can call functions at all. Because the library changes often, the guide advises checking the label on the tag page you plan to use rather than assuming a model size implies support.

FAQ
What is the main difference between the three APIs' tool definitions?
OpenAI's Chat Completions nests name and parameters inside a function object, Responses flattens them, Anthropic uses input_schema for the argument schema, and Gemini lists declarations under functionDeclarations.
Which naming rule is most likely to break portability?
Only Gemini allows colons and dots in function names, so a name like get.weather passes on Gemini but can be rejected by OpenAI and Anthropic.
Can local models handle tool calls?
Yes, if the model carries Ollama's tools label; the guide says such models support single and parallel tool calls plus multi-turn agent loops.
Send on LINE

AI news that matters for your work, delivered every morning.

Pick your industry and the AI tools you use, and get news related to your work every day.

Free · 30 seconds with Google · unsubscribe anytimeWhat is AIToday? →

Ask AI

Ask AI anything about this article. The AI reads this article, earlier AIToday articles, and Wikipedia, and cites its sources. Q&As are published on this page for other readers too.

Questions and answers are published on this page.

Related Articles

Next articleDeepMind staff push to scrap lifetime non-disparagement clauses