Quick access

Function Calling Schema Converter

Paste sample arguments, a JSON Schema, or a tool from one AI provider. Get the tool definition for OpenAI, Claude, Gemini, and MCP, plus Zod and Pydantic code. Nothing leaves your browser.

Example arguments, a JSON Schema, or a tool from OpenAI, Claude, Gemini, or an MCP server. Several tools in an array work too.

Detected: · fixed to valid JSON first

Function

Say what it does and when to use it. The model picks tools by reading this.

Parameters

Describe each field, untick the optional ones, and list allowed values to make an enum.

To edit names and fields, paste one tool at a time.

Options

The tool definition appears here as you paste.


            

About the Function Calling Schema Converter

Every AI provider describes a callable function with JSON Schema, but each wraps it differently: OpenAI uses parameters inside a function tool, Claude uses input_schema, Gemini uses functionDeclarations with its own schema subset, and MCP servers use inputSchema. Paste the arguments your function takes, a JSON Schema, or a tool you already wrote for one provider, and get the definition for all of them. Describe each field, mark the optional ones, and turn on strict mode without hand-editing nested schemas.

How to use it

  1. 1 Paste sample arguments such as {"city": "Dhaka", "days": 3}, a JSON Schema, or an existing OpenAI, Claude, Gemini, or MCP tool.
  2. 2 Name the function, describe what it does, and describe each parameter. Untick fields that are optional and list allowed values to make an enum.
  3. 3 Pick a provider tab and copy or download the tool definition, or the Zod or Pydantic code.

Frequently asked questions

What is function calling?

Function calling, also called tool use, lets a language model ask your code to run a function. You describe each function with a name, a description, and a JSON Schema of its arguments. When the model decides a function would help, it replies with the function name and arguments as JSON, your code runs it, and you send the result back.

What is the difference between OpenAI, Claude, and Gemini tool formats?

The schema for the arguments is the same JSON Schema in all of them; the wrapper changes. OpenAI's Responses API uses {"type": "function", "name", "description", "parameters"}, and Chat Completions nests those inside a "function" key. Claude uses "input_schema" instead of "parameters". Gemini lists tools under "functionDeclarations" and its "parameters" field accepts only part of JSON Schema, while "parametersJsonSchema" takes full JSON Schema.

What does strict mode change?

With strict mode on, the API makes sure every tool call matches your schema exactly. OpenAI requires every field to be listed as required and additionalProperties set to false on every object, so optional fields become nullable instead, such as "type": ["string", "null"]. Claude requires additionalProperties to be false. The converter makes these changes for you and warns about anything strict mode cannot handle.

Why were some keywords removed for Gemini?

Gemini's "parameters" field uses a subset of the OpenAPI schema. It has no $ref, additionalProperties, or exclusiveMinimum, and marks optional values with "nullable": true instead of a null type. The converter inlines $refs and lists anything it removed. To keep the full schema, choose parametersJsonSchema.

How do I write a good tool description?

Say what the function does, when the model should use it and when not, and what it returns. Describe every parameter with its meaning, units, and format, such as "Start time in ISO 8601, in the user's time zone". Use an enum when only a few values are valid. Clear descriptions matter more than anything else for picking the right tool.

Is my schema sent to a server?

No. Everything is converted in your browser, so your tool definitions never leave your device.