🧑‍💻

Tool Definition Generator

🔒 In your browser

Generate a tool/function-calling schema for MCP, Anthropic (Claude) & OpenAI.

How it works

Describe a tool once and get a valid definition in all three formats — Anthropic input_schema, OpenAI function-calling parameters, and an MCP tools/list entry. It writes the JSON Schema for you. Runs entirely in your browser.

Parameters
{
  "name": "get_weather",
  "description": "Get the current weather for a city.",
  "input_schema": {
    "type": "object",
    "properties": {
      "city": {
        "type": "string",
        "description": "City name, e.g. 'Paris'"
      },
      "units": {
        "type": "string",
        "description": "Temperature units",
        "enum": [
          "celsius",
          "fahrenheit"
        ]
      }
    },
    "required": [
      "city"
    ],
    "additionalProperties": false
  }
}

The three formats differ only in their wrapper — Anthropic uses input_schema, OpenAI nests under function.parameters, and MCP uses inputSchema. Everything is generated in your browser.

🔬You might also need MCP tools/list Inspector

About the Tool Definition Generator

Whether you're building an MCP server, a Claude agent or an OpenAI function-calling app, every tool needs a JSON-Schema definition — and each platform wants it wrapped slightly differently. This free tool definition generator lets you describe a tool once and exports it in all three shapes: MCP inputSchema, Anthropic input_schema and OpenAI function parameters.

It writes the JSON Schema for you and runs entirely in your browser — nothing you type is uploaded.

How to use it

  • Give the tool a name and a clear description — the model reads the description to decide when to call it.
  • Add each parameter: its name, type, whether it's required, an optional description, and any allowed (enum) values.
  • Switch between the Anthropic, OpenAI and MCP tabs and copy the format you need.

How the three formats differ

The underlying JSON Schema is identical across all three — only the wrapper changes. Anthropic's Messages API expects each tool as { name, description, input_schema }. OpenAI's function calling nests it as { type: "function", function: { name, description, parameters } }. An MCP server returns { name, description, inputSchema } from its tools/list. This generator keeps the schema in sync so you can target any of them without hand-editing.

Writing schemas the model uses well

  • Describe every parameter — models pick and fill arguments far more reliably when each field is documented.
  • Use enum for fixed choices so the model can't invent an invalid value.
  • Mark only genuinely required fields as required; make the rest optional with sensible handling.

Frequently asked questions

Which formats does it output?

Three: Anthropic (Claude) input_schema, OpenAI function-calling parameters, and MCP tools/list inputSchema. The JSON Schema is shared; only the wrapper differs.

Do I need to know JSON Schema?

No. You fill in a simple form — name, type, required, description, allowed values — and the tool writes valid JSON Schema for you.

What parameter types are supported?

string, number, integer, boolean, array and object. For arrays you can set the item type, and any field can have an enum of allowed values.

Is anything uploaded?

No. The definition is generated in your browser, so your tool names, descriptions and schema stay on your device.

Related searches

tool definition generatorfunction calling schemaopenai function schemaanthropic tool schemamcp inputschemajson schema for llm tool

Related Developer tools

🔗 Embed this tool on your website — free

Copy this and paste it into your page's HTML. The tool runs in the visitor's browser, just like here. Change height to fit, or add the optional auto-resize snippet below. Add ?theme=dark to the URL for dark mode.

<iframe src="https://toolhq.dev/embed/tool-definition-generator/" title="Tool Definition Generator — ToolsHub" width="100%" height="520" style="border:1px solid #e5e7eb;border-radius:12px;max-width:680px" loading="lazy"></iframe>
Optional: auto-resize the iframe height

Add this once on the same page so the iframe grows to fit the tool:

<script>
addEventListener("message", function (e) {
  if (e.data && e.data.type === "toolshub:resize") {
    document.querySelectorAll('iframe[src*="/embed/"]').forEach(function (f) {
      if (f.contentWindow === e.source) f.style.height = e.data.height + "px";
    });
  }
});
</script>