Tool guide
About this tool.
- Function calling, also called tool use, lets a language model ask your code to run a function. You describe each function with a name, a description and a JSON Schema for its arguments; the model then answers with a call whose arguments match that schema.
- Writing those schemas by hand is slow and easy to get wrong. This tool infers the schema from example arguments instead: every property gets the type its values have, a property that appears in every example is required, and one that some examples leave out is optional.
- The three providers want different wrappers. OpenAI nests the schema under function.parameters, Anthropic calls it input_schema, and Gemini lists functionDeclarations whose parameters follow an OpenAPI subset. OpenAI strict mode adds its own rules: closed objects, every property required and optional values written as nullable.
- Start a tool definition from a real call payload you already log or test with.
- Get the same tool as OpenAI, Anthropic and Gemini definitions when you compare or switch providers.
- Turn on OpenAI strict mode without rewriting optional properties as nullable by hand.
- Check which keywords strict mode would drop before you paste a schema into a request.
Paste example arguments as JSON in the main input: one object, or an array of 1-20 objects that are calls of the same function.
Set the function name and a description that tells the model when to call it. The name may use letters, digits, _ and -, up to 64 characters; the description may have up to 1,024 characters.
Choose a provider, or all to get { openai, anthropic, gemini } in one JSON document. Strict mode applies only to the OpenAI definition.
The summary estimates the tokens the compact definition adds to every request and lists keywords dropped by strict mode. Copy the JSON or save it as <name>.tools.json.
- {"city":"Prague"} → parameters with city: string, required: ["city"]
- [{"q":"a","limit":5},{"q":"b"}] → q required, limit optional
- OpenAI strict, limit optional → limit: { type: ["integer", "null"] }, listed in required
- Anthropic → { name, description, input_schema }
- Gemini, zip "0150" or null → zip: { type: "string", nullable: true }
- Name "get weather" → Name must be 1-64 characters: letters, digits, _ or -.
- Processing is local; nothing is uploaded and no model is called.
- The examples are limited to 1,000,000 characters, 50,000 values and 30 nesting levels; an array of examples counts as one level.
- The generated schema is limited to 5,000 values; nothing is cut silently.
- OpenAI Responses API form: { "type": "function", "name": ..., "description": ..., "parameters": ..., "strict": true }, the same fields without the function wrapper.
- OpenAI strict mode keeps only type, properties, required, additionalProperties, items, enum, anyOf and description.
- Integers and decimals are told apart: 3 gives integer, 3.5 gives number.
- $schema and title are removed, because the providers do not use them.
- Only own keys are read, so constructor is an ordinary name; __proto__ is kept as a pattern property, which strict mode drops; the Gemini definition lists it as an ordinary property.