Function Calling and Tool Schema Builder

Define AI tools without hand-writing JSON Schema, catch mistakes before the model does, test arguments, and export the same tools for OpenAI, Anthropic, Gemini or MCP.

Berjalan dalam pelayar anda. Fail anda tidak pernah meninggalkan peranti. Lihat cara menyemaknya

…

Cara melakukannya

  1. 1
    Add a tool

    Press + Tool and enter a name and a clear description.

  2. 2
    Add parameters

    Use + Add field, choose types and fill in descriptions, enums and limits.

  3. 3
    Nest where needed

    Use array and object types to build lists and structured inputs.

  4. 4
    Fix the checks

    Clear every error shown in the checks panel.

  5. 5
    Export

    Choose a provider format on the Export tab and copy or download it.

  6. 6
    Test arguments

    Paste model output on the Test tab to validate it against the schema.

Tentang alat ini

Function calling, also called tool use, lets a language model ask your code to do something: look up an order, check the weather, create a ticket. You describe each tool with a name, a description and a JSON Schema for its parameters, and the model replies with arguments that should fit that schema. Writing those schemas by hand is slow and fragile. A missing required list, a misspelled type or an enum written as a string instead of an array silently weakens what the model receives, and every provider wraps the same schema in a slightly different envelope. This builder replaces the hand-written JSON with a form. Add tools, give each a clear description, and build parameters as a tree of fields with types, descriptions, enums, formats, limits, arrays and nested objects. Checks run as you type. One click exports the set for OpenAI Chat Completions, the OpenAI Responses API, Anthropic Messages, Google Gemini or an MCP server, and the import tab reads any of those formats back, so the tool doubles as a converter.

Building parameters

Each field has a name, a type (string, number, integer, boolean, enum, array or object), a description, a required switch and an option to allow null. Strings can have a format such as date, date-time, email, uri or uuid, a pattern and length limits; numbers can have minimum and maximum values; arrays have an item definition and item limits; objects hold their own fields, nested as deep as you need. Fields can be moved up and down or deleted, and every change can be undone.

Checks that save debugging time

The checker enforces the name rule shared by the major APIs, 1 to 64 letters, digits, underscores or hyphens, and flags duplicate tool names, empty or very short descriptions, missing property names, duplicates inside an object, enums with no values, invalid regular expressions and minimums above maximums. With OpenAI strict mode switched on it also applies the strict rules: every object closed with additionalProperties false, every property listed as required, optional values expressed as nullable, and no unsupported keywords. The builder writes strict schemas this way automatically.

Export and conversion

OpenAI formats wrap each tool as a function with parameters and the strict flag. Anthropic uses name, description and input_schema. Gemini receives functionDeclarations with an OpenAPI-style schema: upper-case types, a nullable flag and no additionalProperties. The MCP export is a tools list with inputSchema, ready for a tools/list handler. TypeScript interfaces for every tool's arguments are generated too, so your handler code can be typed.

Testing arguments

Paste the arguments a model produced, with or without code fences, and the validator reports type errors, missing required fields, values outside enums or limits, pattern mismatches and unexpected properties, each with its path.

Limits

The builder covers the JSON Schema features that tool APIs widely accept; it does not produce $ref, allOf or conditional schemas, and imports flatten unions to their first branch. Provider rules change, so check the current documentation for new limits. It does not call any model or run your functions.

Contoh berselesaian

A developer needs two tools for a shop assistant. get_weather takes a required city string and an optional unit enum with celsius and fahrenheit. create_order takes an items array of objects, each with a sku string and a qty integer from 1 to 99, plus an optional note of up to 300 characters. With strict mode on, the parameters schema lists city and unit as required and the unit enum becomes celsius, fahrenheit and null, which is how strict mode expresses an optional value. The checks panel shows no errors or warnings. She exports for OpenAI Chat Completions, then switches to Anthropic and Gemini to get the same tools in their formats. On the test tab she pastes arguments returned by a model in which the first item has sku A-1 and qty 0, and sees the error $.items[0].qty below minimum 1.

Ringkasnya

Soalan lazim

Which providers can I export to?

OpenAI Chat Completions, the OpenAI Responses API, Anthropic Messages, Google Gemini function declarations and the MCP tools/list format. Import reads all of them, so you can convert between providers.

What does strict mode change?

For OpenAI it guarantees arguments match the schema exactly. The schema must close every object, list every property as required and make optional values nullable. The builder applies those rules and checks them.

How do I make a parameter optional?

Untick required. In normal mode it is left out of the required list. In strict mode it stays required but accepts null, which the model sends when it has no value.

Why are descriptions so important?

Models choose tools and fill arguments mainly from names and descriptions. Say what the tool does, when to call it and what each field means, with an example value where it helps.

Does this send my tools to an AI service?

No. Everything runs in your browser and the tools are saved only on this device. Nothing is sent to any model provider or to this site.

Can I import a tool from existing code?

Paste the JSON from your code or API logs on the Import tab. OpenAI, Anthropic, Gemini and MCP formats are detected, as is a bare JSON Schema object.

Percuma sepenuhnyaTiada bayaran, tiada pendaftaran
Fail kekal peribadiSemuanya berjalan dalam pelayar anda
Mudah dalam bahasa andaTersedia dalam banyak bahasa