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 usesinput_schema; OpenAI places the schema attools[].function.parameters; Gemini usesfunctionDeclarations[].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
- Keep the tool
nameidentical across providers. - Describe when the tool should and should not be called.
- Confirm every
requiredentry exists inproperties. - Preserve schemas inside nested objects and array
items. - Apply strict object constraints recursively where required.
- Remove unsupported
$schema,$idand other metadata. - Match type representation to the current target SDK.
- Test valid input, a missing required field and an extra field.
- Validate model-generated arguments again on the server.
- Return actionable tool errors so the agent does not retry forever.
Primary documentation
- MCP Tools Specification
- OpenAI Function Calling Guide
- Anthropic Tool Use Documentation
- Google Gemini Function Calling
- JSON Schema Specification
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.