HCODX/JSON Schema to Tool
100% browser-based · OpenAI / Anthropic / Gemini

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.

JSON Schema
Tool definition
Generate options
Function calling converter
Input size
0 B
Output size
0 B
Target
OpenAI
Status
Ready
Example

Schema in, tool spec out

The title becomes the function name; description stays put. Everything else (properties, required, enum) lands inside the parameters block.

JSON Schema
{
  "title": "get_weather",
  "description": "Get current weather",
  "type": "object",
  "properties": {
    "location": { "type": "string" }
  },
  "required": ["location"]
}
Tool (OpenAI)
{
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Get current weather",
    "parameters": { ... }
  }
}
Use cases

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.

Step by step

How to convert a schema

1

Paste your schema

Include title (becomes the function name) and description.

2

Pick a target

OpenAI, Anthropic, or Gemini. Strict mode is OpenAI-only.

3

Generate

Auto-generate is on — the right pane updates live.

4

Copy or download

Save as tool.json or paste straight into the SDK call.

FAQ

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

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 to name if 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}} + optional strict.
  • Anthropic{name, description, input_schema}.
  • Gemini{name, description, parameters} (inside functionDeclarations).
Related

Related tools