ByteTools Logo

Function Schema Builder

Build JSON schemas for OpenAI function calling visually. Export ready-to-use function definitions.

Quick Start Templates

Function Definition

JSON Schema

{
  "type": "function",
  "function": {
    "name": "my_function",
    "description": "Description of what this function does",
    "parameters": {
      "type": "object",
      "properties": {
        "param1": {
          "type": "string",
          "description": "Description of parameter"
        }
      },
      "required": [
        "param1"
      ]
    }
  }
}

Usage in OpenAI API

const response = await openai.chat.completions.create({
  model: "gpt-4o",
  messages: [...],
  tools: [my_functionSchema],
  tool_choice: "auto"
});

About Function Calling

OpenAI function calling allows GPT models to generate structured outputs that match your schema. The model doesn't execute functions - it returns JSON that your code can use to call functions.

  • • Use clear, descriptive function and parameter names
  • • Provide detailed descriptions for better model understanding
  • • Mark only truly required parameters as required
  • • Use enums to constrain string values when possible