MCP Tool Schema Conversion Guide: Claude, OpenAI & Gemini Function Calling

Compare MCP inputSchema, Claude input_schema, OpenAI tools[].function.parameters and Gemini functionDeclarations, with practical fixes for strict mode, required fields, additionalProperties and type casing.

An AI agent cannot act on a prompt alone. It needs a machine-readable description of the tools it may call, the arguments each tool accepts, and which fields are required. The Model Context Protocol (MCP) makes tools easier to expose and discover, but it does not make every model provider's API payload identical.

A Claude input_schema cannot simply be pasted into an OpenAI request without the correct wrapper. An OpenAI tool written for strict mode may include constraints that need review before it is used with Gemini. This guide focuses on the practical problem behind the trend: how to move one tool definition among MCP, Claude, OpenAI and Gemini without losing its contract.


TL;DR: MCP, Claude, OpenAI and Gemini all use JSON-Schema-like structures to describe tool arguments, but their wrappers, field names and supported subsets differ. MCP commonly exposes inputSchema; Claude uses input_schema; OpenAI places the schema at tools[].function.parameters; Gemini uses functionDeclarations[].parameters. Normalize the arguments into a plain JSON Schema first, then generate the provider-specific wrapper.


MCP vs Claude vs OpenAI vs Gemini tool schemas

Target Parameter schema location Main migration concern
MCP inputSchema in a tools/list result The tool also carries a name and description
Claude tools[].input_schema Uses a snake_case wrapper field
OpenAI tools[].function.parameters Strict mode imposes tighter object requirements
Gemini functionDeclarations[].parameters Supports a provider-specific JSON Schema/OpenAPI subset

The common mistake is to rename input_schema to parameters while leaving the rest of the object untouched. The argument contract may look familiar, but the surrounding API request is still invalid.

One weather tool in four formats

Start with a provider-neutral argument schema:

{
  "type": "object",
  "properties": {
    "city": {
      "type": "string",
      "description": "City name, for example Shanghai"
    },
    "unit": {
      "type": "string",
      "enum": ["celsius", "fahrenheit"]
    }
  },
  "required": ["city"]
}

MCP tool

{
  "name": "get_weather",
  "description": "Get the current weather for a city",
  "inputSchema": {
    "type": "object",
    "properties": {
      "city": { "type": "string" },
      "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] }
    },
    "required": ["city"]
  }
}

Claude tool use

{
  "name": "get_weather",
  "description": "Get the current weather for a city",
  "input_schema": {
    "type": "object",
    "properties": {
      "city": { "type": "string" },
      "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] }
    },
    "required": ["city"]
  }
}

OpenAI function calling

{
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Get the current weather for a city",
    "parameters": {
      "type": "object",
      "properties": {
        "city": { "type": "string" },
        "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] }
      },
      "required": ["city"]
    }
  }
}

Gemini function calling

{
  "name": "get_weather",
  "description": "Get the current weather for a city",
  "parameters": {
    "type": "OBJECT",
    "properties": {
      "city": { "type": "STRING" },
      "unit": { "type": "STRING", "enum": ["celsius", "fahrenheit"] }
    },
    "required": ["city"]
  }
}

Gemini SDK versions may represent types as enum values or accept lowercase JSON Schema strings. Check the documentation for the SDK version used by your project instead of relying on a copied snippet.

Six common schema conversion failures

1. Copying the arguments without changing the wrapper

OpenAI expects a type: "function" wrapper and a nested function object. Claude places name, description and input_schema directly on each tool. A complete Claude tool object does not belong inside OpenAI's parameters field.

2. Missing additionalProperties: false in strict mode

Strict tool definitions are intended to make generated arguments conform to the declared schema. Object nodes commonly need to reject undeclared fields, including nested objects. Apply the rule recursively rather than only at the root.

3. A required list that disagrees with properties

Every name in required must exist in properties. Some strict structured-output modes also require all properties to be listed as required, with optionality represented through nullable types. Follow the target API's current rules.

4. Passing unsupported JSON Schema keywords to Gemini

Metadata such as $schema and $id, or complex uses of additionalProperties, may fall outside a target API's supported subset. Remove unsupported metadata without accidentally dropping meaningful constraints such as enum, required or nested items.

5. Renaming tools between providers

get-weather, get_weather and GetWeather may look equivalent to a person, but an agent dispatcher treats them as different identifiers. Choose one naming convention and keep it stable across providers.

6. A valid schema with a vague description

Passing validation does not guarantee correct tool selection. A useful description explains when the tool should be called, the boundary of its inputs and when it should not be used. “Queries data” is rarely enough.

Convert a tool schema in the browser

Open the Tool Schema Converter and paste a Claude tool, OpenAI function, Gemini function declaration or raw JSON Schema. It detects the input and generates provider-specific outputs side by side.

Strict mode adds additionalProperties: false to object nodes and normalizes required properties. After conversion, use the JSON Formatter to verify syntax and the Token Counter to estimate how much a large tool catalog adds to the model context.

Format conversion solves structural differences; it cannot prove that the business contract is correct. Test the generated definition with the exact SDK and model configuration used in production.

MCP and multi-model migration checklist

  1. Keep the tool name identical across providers.
  2. Describe when the tool should and should not be called.
  3. Confirm every required entry exists in properties.
  4. Preserve schemas inside nested objects and array items.
  5. Apply strict object constraints recursively where required.
  6. Remove unsupported $schema, $id and other metadata.
  7. Match type representation to the current target SDK.
  8. Test valid input, a missing required field and an extra field.
  9. Validate model-generated arguments again on the server.
  10. Return actionable tool errors so the agent does not retry forever.

Primary documentation

Frequently asked questions

Can an MCP inputSchema be used directly with Claude?

The argument schema is often reusable, but Claude's API wrapper uses input_schema. Convert the surrounding field and verify that every JSON Schema feature used by the MCP tool is supported by the target Claude API.

What is the difference between Claude input_schema and OpenAI parameters?

Both describe arguments with JSON Schema, but they occupy different provider-specific objects. OpenAI can also apply strict mode at the function level, so this is more than a field-name replacement.

Why does a schema fail after enabling strict: true?

Typical causes include allowing undeclared object properties, an incomplete required list, or a JSON Schema keyword outside the API's supported subset.

Why are Gemini parameter types sometimes uppercase?

Different Gemini SDKs and examples may use enum constants or JSON strings. The converter produces the common uppercase representation, but the SDK version in your application remains the source of truth.

Does the converter upload private API definitions?

PocketKit's Tool Schema Converter processes pasted JSON in the browser without requiring the schema to be sent to a conversion server. You should still remove API keys, internal URLs and example secrets before pasting any definition.

Is testing still necessary after conversion?

Yes. A converter can map structure, but it cannot validate service permissions, timeouts, domain-specific constraints or recovery behavior. Test at least one successful call and two expected failures.


For a broader workflow, use the AI App Developer Suite to combine schema conversion, token budgeting, prompt drafting and prompt-safety checks.

FAQ

Frequently asked questions

Can an MCP inputSchema be used directly with Claude?

The argument schema is often reusable, but Claude uses the input_schema wrapper. Convert the outer field and verify that the target API supports every JSON Schema feature used.

What is the difference between Claude input_schema and OpenAI parameters?

Both describe arguments with JSON Schema, but they belong to different API wrappers. OpenAI can also enable strict mode on the function object.

Why does a schema fail after enabling strict true?

Common causes are undeclared object properties, an incomplete required list, or a JSON Schema keyword outside the target API supported subset.

Is testing still necessary after tool schema conversion?

Yes. Conversion maps structure but cannot validate service permissions, timeouts, domain constraints or error recovery behavior.

← Back to blog