JSON Schema to Tool
Turn a JSON Schema into a function/tool definition for OpenAI, Anthropic, or Gemini. Paste your schema with title and description; get a ready-to-use tool spec out.
Schema in, tool spec out
The title becomes the function name; description stays put. Everything else (properties, required, enum) lands inside the parameters block.
{
"title": "get_weather",
"description": "Get current weather",
"type": "object",
"properties": {
"location": { "type": "string" }
},
"required": ["location"]
}{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get current weather",
"parameters": { ... }
}
}What you'll use this for
Most schemas already exist somewhere — DB models, OpenAPI specs, validation libraries. This skips the manual translation step.
RAG agent dev
Promote existing JSON Schemas to first-class LLM tools without hand-writing each spec.
Internal tool definitions
Keep one canonical schema in your repo; emit per-provider tool specs at build time.
Structured outputs
OpenAI's strict mode wants a tool definition. Toggle the flag and ship.
JSON-mode prompts
Generate tool specs the model can fill in, instead of free-form JSON.
How to convert a schema
Paste your schema
Include title (becomes the function name) and description.
Pick a target
OpenAI, Anthropic, or Gemini. Strict mode is OpenAI-only.
Generate
Auto-generate is on — the right pane updates live.
Copy or download
Save as tool.json or paste straight into the SDK call.
Frequently asked questions
Basic types (string, number, boolean, object, array), enum, and required. More exotic constructs pass through as-is — providers vary on what they accept.
No. References pass through unchanged. Most providers don't accept $ref inside tool schemas, so inline before generating.
Yes. No signup, no limits. Schemas stay in your browser.
For OpenAI structured outputs that must conform exactly to the schema — costs a bit more latency for stricter parsing. Anthropic and Gemini have their own equivalents.
Use the Function Calling Converter to move between provider tool formats; or simply extract the parameters / input_schema block by hand.
About schema-to-tool conversion
Every major LLM tool format is, at heart, a thin wrapper around a JSON Schema. This tool extracts the wrapper convention for you so the same schema can power three different providers without copy-paste.
Required schema fields
title— function name (falls back tonameif title is absent).description— shown to the model when picking a tool.type: "object"— tool parameters are always objects.properties— the field map.required— list of required keys (optional).
Target wrappers
- OpenAI —
{type:"function", function:{name, description, parameters}}+ optionalstrict. - Anthropic —
{name, description, input_schema}. - Gemini —
{name, description, parameters}(insidefunctionDeclarations).