Tool Schema Generator

Generate multi-tool schemas for OpenAI and Anthropic function calling APIs

Tools (1)

Tool 1
[
  {
    "type": "function",
    "function": {
      "name": "search_web",
      "description": "Search the web for information",
      "parameters": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "description": "The search query"
          }
        },
        "required": [
          "query"
        ]
      }
    }
  }
]

Related Tools

What is a Tool Schema Generator?

Function calling (also called tool use) allows LLMs to invoke external functions by generating structured JSON that matches a predefined schema. Each tool needs a name, description, and JSON Schema defining its input parameters. This generator helps you define multiple tools and export them in the correct format for OpenAI or Anthropic APIs.

Building AI agents with tool use is one of the most powerful LLM capabilities. This tool simplifies the process by letting you visually define tools and their parameters, then copy the generated schema directly into your API calls.

OpenAI vs Anthropic Format Differences

OpenAI Format

Wraps each tool in type: "function" with a nested function object containing name, description, and parameters.

Anthropic Format

Flatter structure with name, description, and input_schema at the top level. Uses snake_case for the schema field.

JSON Schema Best Practices

  • Use descriptive names: Tool names should be clear verbs like search_web, send_email, create_file.
  • Write detailed descriptions: The description helps the model understand when to use the tool and what it does.
  • Specify required fields: Mark essential parameters as required to ensure the model always provides them.
  • Add property descriptions: Describe each parameter so the model knows what values to provide.
  • Use enums for limited options: When a parameter has specific valid values, use enum to constrain choices.

Common AI Agent Tools

Tool NamePurpose
search_webSearch the internet for information
read_fileRead contents of a local file
write_fileCreate or modify a file
run_codeExecute code in a sandbox
send_emailSend an email notification

Frequently Asked Questions

How many tools can I define?

OpenAI supports up to 128 tools per request. Anthropic recommends keeping it under 20 for best performance. Too many tools can confuse the model about which to use.

What if the model calls the wrong tool?

Improve your tool descriptions to be more specific about when each tool should be used. Also ensure tool names are distinct and self-explanatory.

Can I nest objects in the schema?

Yes! JSON Schema supports nested objects, arrays, and complex types. Use type: "object" with nested properties for complex inputs.