Function Schema Builder

Set function name, description, and parameter fields to generate OpenAI tools JSON for function calling with fewer schema mistakes.

Read the full guide: JSON Schema API Design Guide: From Sample Generation to LLM Validation →

Privacy: processed locally, never uploaded.

↓ Paste in the input area below to see results instantly

Set function name, description, and parameter fields to build an OpenAI function-calling JSON schema.

Function name
Description

Parameter fields

One per line: name,type,description,required (true/false)

Function schema

Notes

Field types

type supports string, number, integer, boolean, array, object. Output matches OpenAI tools format for API requests.

Set function name, description, and parameter fields to generate OpenAI tools JSON for function calling with fewer schema mistakes.

Quick start

  1. Set metadata

    Use snake_case names; describe what the function does.

  2. Define fields

    Per line: name,type,description,required.

Field types

string, number, integer, boolean, array, object; required true marks mandatory params.

Typical Workflow

Start by entering the function name and description. The name should be concise, while the description clearly explains its purpose. Then add parameters one by one, including name, type, description, and whether it's required. The tool provides real-time JSON preview for OpenAI compliance checking.

After building, copy the generated JSON directly to your project. We recommend testing the function calls in OpenAI Playground first. Need adjustments? Just modify fields in the tool to regenerate - far safer than manual JSON editing.

Examples

Weather function

Input

get_weather + city field

Output

OpenAI tools JSON

FAQ

Nested objects?

Flat params only; edit output JSON for nesting.

Can the generated schema be used outside OpenAI?

Yes. While optimized for OpenAI, the JSON follows general function definition standards. Note that other platforms may have specific requirements for parameter types or structure - always cross-check with their documentation.