AI

Function Calling Builder

Convert a JSON schema into OpenAI and Anthropic tool-call specs.

All tools

Function

JSON Schema (parameters)

OpenAI tool spec

{
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Get the current weather for a city",
    "parameters": {
      "type": "object",
      "properties": {
        "location": {
          "type": "string",
          "description": "City name, e.g. Paris"
        },
        "units": {
          "type": "string",
          "enum": [
            "celsius",
            "fahrenheit"
          ]
        }
      },
      "required": [
        "location"
      ]
    }
  }
}

Frequently asked questions

What is the difference between OpenAI and Anthropic tool-call formats?
OpenAI wraps tools as {type: "function", function: {name, description, parameters}} while Anthropic uses a flatter {name, description, input_schema} shape. Both consume standard JSON Schema for the parameters.
What JSON Schema features do tool calls support?
Most providers support type, properties, required, enum, description, and nested objects or arrays. Advanced keywords like $ref, oneOf, or pattern are inconsistently honored, so keep schemas flat and explicit.
How do I make the model actually call my tool?
Give the function a verb-based name, write a one-sentence description focused on when to use it, mark required fields, and add descriptions on each property. Vague schemas are the top cause of skipped or malformed calls.