1{"name":"getWeather","description":"Get the current weather for a location","parameters":{"type":"object","properties":{"name":{"type":"string","description":"name","default":"getWeather"},"description":{"type":"string","description":"description","default":"Get the current weather for a location"},"location":{"type":"object","properties":{"type":{"type":"string","description":"type","default":"string"},"description":{"type":"string","description":"description","default":"City name, e.g. Tokyo"}},"required":["type","description"],"additionalProperties":false,"description":"location object"},"unit":{"type":"string","description":"unit","default":"celsius"},"includeforecast":{"type":"boolean","description":"include forecast","default":true},"days":{"type":"integer","description":"days","default":3}},"required":["name","description","location","unit","includeforecast","days"],"additionalProperties":false}}JSON to Function Calling Schema converts a JSON example into a tool/function declaration that OpenAI, Anthropic Claude, and Google Gemini all accept. Paste a sample payload, choose a provider, and copy the schema directly into your SDK call.
Tool calling APIs require provider-specific schemas: OpenAI's parameters, Claude's input_schema, Gemini's uppercased OpenAPI types. Hand-writing them for every endpoint is error-prone. This tool infers the schema from a real JSON example, applies sensible defaults (formats, enums, required fields), and emits the exact shape each SDK expects — plus a ready-to-paste usage snippet.
Pasted JSON, uploaded files, and schema generation run entirely in your browser. The Extract from URL tab is the only path that touches the server, and only to proxy the URL you supply so CORS does not block direct fetches. Nothing is stored.
OpenAI emits { name, description, parameters } compatible with Chat Completions tools and Assistants. Claude emits { name, description, input_schema } for the Messages API tool_use blocks. Gemini emits OpenAPI-flavored function declarations with uppercased types (STRING, OBJECT) for the Generative AI SDK.
camelCase converts keys like signup_date to signupDate (recommended for JavaScript/TypeScript clients). snake_case enforces Python-friendly keys. Preserve keeps your input casing untouched.
Disable when most parameters are optional or you want the model to omit fields freely. By default every key from your JSON is marked required, which gives the most deterministic behavior.
When a string field shows a small set of distinct values across array samples (e.g. status: 'open' | 'closed'), the schema emits an enum constraint. The threshold caps the maximum unique values that will be promoted to an enum.
Strict mode adds strict: true and enforces additionalProperties: false plus required-on-all-fields, matching OpenAI's structured outputs contract that guarantees the model's response conforms to the schema.