Function Calling / Tool Schema Converter

Describe a function once, get OpenAI and Anthropic tool-use JSON schemas side by side.

What is the Function Calling / Tool Schema Converter?

OpenAI and Anthropic both let a model call functions/tools you define, and both use JSON Schema underneath — but the surrounding envelope is different for each. This tool lets you describe a function once (name, description, parameters) and generates both providers' exact JSON shapes side by side.

The two shapes

OpenAI's function-calling format wraps the schema in {"type": "function", "function": {"name", "description", "parameters"}}, with the parameter schema itself under the parameters key. Anthropic's tool-use format is flatter: {"name", "description", "input_schema"}, with the parameter schema under input_schema instead. Both use the same underlying JSON Schema conventions for the parameter definitions themselves (type, properties, required), which is why one form can generate both outputs from the same inputs.

How to use it

  1. Name your function and describe what it does.
  2. Add a row per parameter: its name, JSON type, a description, and whether it's required.
  3. Copy whichever JSON block matches the API you're integrating with.

Double-check against your SDK's current documentation before shipping to production — both providers occasionally add optional fields (like strict-mode flags) that this generator doesn't include by default.