Build a function definition once and get the OpenAI tool-calling or Anthropic tool-use JSON schema for it, without hand-writing nested JSON Schema.
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get the current weather for a given location.",
"parameters": {
"type": "object",
"properties": {
"location": {
"type": "string",
"description": "City and state, e.g. San Francisco, CA"
},
"unit": {
"type": "string",
"enum": [
"celsius",
"fahrenheit"
],
"description": "Temperature unit"
}
},
"required": [
"location"
]
}
}
}
Both providers use JSON Schema for parameters โ the wrapper differs (OpenAI nests under function.parameters, Anthropic uses input_schema at the top level). 100% client-side.
About the Tool-Calling Schema Generator
Both OpenAI's function/tool calling and Anthropic's tool use expect a JSON Schema description of each parameter, wrapped slightly differently per provider. Hand-writing that nested JSON โ types, enums, required lists โ is repetitive and error-prone. This tool lets you define parameters through a form and generates valid, correctly-wrapped JSON for either provider.
Key Features
Supports string, number, boolean, enum, array, and object parameter types.
Outputs the OpenAI tools array format or Anthropic's input_schema format.
Pairs with the JSON to Zod/Pydantic generator for validating the arguments a model returns.