# LLM Tool-Calling JSON Schema Builder

Define an LLM tool once and emit validated function-calling payloads for OpenAI, Anthropic and Gemini.

> Canonical page: https://elysiatools.com/en/tools/llm-tool-calling-json-schema-builder

- **Category:** AI Tools

- **Keywords:** function calling, tool schema, json schema, openai tools, anthropic tool use, gemini function declarations, llm agent, mcp, structured outputs

## Overview

One-line-per-parameter DSL in, three ready-to-paste provider payloads out, with a validation table that catches the schema differences that cause 400 errors before you ship.

## Inputs

- **Tool name** (text): get_weather
- **Tool description** (textarea): Get the current weather for a city. Use when the user asks about temperature, conditions or a forecast.
- **Parameters (one per line)** (textarea): city | string | required | City name, e.g. "Paris" units | enum | optional | Temperature unit for the report location | object | required | Coordinates lat | number | required | Latitude in degrees lng | number | required | Longitude in degrees
- **Strict mode** (checkbox)
- **tool_choice** (select)

## When to use

- When building multi-provider AI agents and needing standardized tool calling schemas for OpenAI, Anthropic, and Gemini without writing JSON by hand.
- When implementing strict structured outputs that require comprehensive required arrays and nullable-union handling for optional parameters.
- When defining nested object and array parameter structures using simple indentation instead of deep, error-prone JSON schema boilerplate.

## How it works

- Enter the tool name, description, and parameter list using the line-by-line syntax (name | type | required/optional | description), indenting child properties for nested objects or arrays.
- Configure provider options by toggling strict mode and selecting the desired tool_choice setting (omit, auto, or force).
- Inspect the generated parameter validation table to verify type formatting, enum constraints, and provider-specific schema requirements.
- Copy the generated JSON schemas directly into your OpenAI tools array, Anthropic tools configuration, or Gemini function declarations.

## Use cases

- Standardizing function calling definitions across hybrid agent stacks running OpenAI GPT-4o, Claude 3.5 Sonnet, and Gemini 1.5 Pro.
- Prototyping complex nested API tools with enum constraints and structured array payloads without hand-crafting verbose JSON schemas.
- Generating Model Context Protocol (MCP) compatible tool declarations with verified parameter types and strict validation.

## Frequently asked questions

### How does the builder handle differences between OpenAI, Anthropic, and Gemini schemas?

It translates your single parameter definition into provider-specific formats, generating standard JSON Schema for OpenAI and Anthropic and uppercase types with propertyOrdering for Gemini.

### How do I specify nested objects and arrays?

Declare the parent as object or array, then indent child parameters with spaces directly beneath it.

### What parameter types are supported in the DSL?

Supported types include string, number, integer, boolean, object, array, and enum.

### What does enabling Strict Mode do?

Strict mode enforces OpenAI Structured Outputs rules by ensuring all properties are listed under required, with optional parameters represented as nullable type unions.

### How does the tool_choice setting affect the output?

It sets the provider-specific tool selection behavior payload to omit the property, allow automatic model choice, or force the model to invoke the tool.

## Related tools

- [MCP Server Contract Tester — stdio + WebSocket Transports, JSON Schema 2020-12 Tool Validation](https://elysiatools.com/en/tools/model-context-protocol-mcp-server-tool-schema-stdio-websocket-transport-contract-tester): End-to-end Model Context Protocol contract testing: JSON-RPC 2.0 initialize handshake and version negotiation over stdio (newline-delimited) and WebSocket (one message per text frame), tools/list inputSchema object-root and draft 2020-12 compilation, resources/list + read, prompts/list + get, ping, -32601 error semantics, sampling/createMessage round-trip, and framing discipline — with an embedded reference server for offline self-verification.
- [ECharts Theme Token Extractor](https://elysiatools.com/en/tools/echarts-theme-token-extractor): Extract design tokens — colors, numbers, font sizes and strings — from an ECharts theme JSON and export them straight into your design system. Paste a theme object (the kind registered via echarts.init(dom, themeName)) and the tool walks every leaf, tagging each color (with optional named/rgb → hex normalization), spacing number, font size and string, then emits clean CSS variables, a Tailwind theme.extend config, Style Dictionary tokens.json, or SCSS variables. Bridges the gap between an ECharts visualization theme and Figma/CSS/Tailwind design tokens without copying each value by hand.
- [Image Palette to Design Tokens](https://elysiatools.com/en/tools/image-to-design-tokens): Extract a dominant color palette from an image (k-means clustering), then export it as CSS variables, SCSS variables, a Tailwind config, or JSON design tokens — with named colors and an auto-generated shade scale for each
- [JSON Path Extractor](https://elysiatools.com/en/tools/json-path-extractor): Query JSON with JSONPath or JMESPath-style expressions, inspect matched paths, and highlight extracted values in the original document
- [JSONPath Query Tool](https://elysiatools.com/en/tools/jsonpath-query-tool): Query arbitrary JSON with JSONPath expressions, preview matches, switch output modes, and save reusable query templates
- [JWK Generator & Parser](https://elysiatools.com/en/tools/jwk-generator): Generate JSON Web Keys (JWK) for RSA, EC (P-256/P-384/P-521/secp256k1), and OKP (Ed25519/Ed448/X25519/X448), or parse an existing JWK to inspect its parameters, thumbprint, and metadata
- [OCR PDF to Structured JSON Bridge](https://elysiatools.com/en/tools/ocr-pdf-to-structured-json-bridge): Extract the PDF text layer with geometry (lines by y-position, tables by column gaps, headings by font size, colon key-value pairs), then fill a user-supplied JSON Schema field by field — labels matched by normalized keys, values coerced to declared types and validated with ajv.
- [PDF to JSON Structure Explorer](https://elysiatools.com/en/tools/pdf-to-json-structure-explorer): Extract structured OpenDataLoader JSON from a PDF and browse headings, paragraphs, tables, lists, pages, and bounding boxes in an explorer view

## Samples

- [Terraform Plan JSON Samples](https://elysiatools.com/en/samples/terraform-plan-json-samples): Sample Terraform plan JSON files exported from terraform show -json style payloads for dependency visualization and change review
- [Chat Transcript JSON Samples](https://elysiatools.com/en/samples/chat-transcript-json): JSON examples for multi-role chat transcripts
- [JSON Samples](https://elysiatools.com/en/samples/json): JSON (JavaScript Object Notation) format examples from simple to complex structures
- [Rich Media JSON Samples](https://elysiatools.com/en/samples/rich-media-json): JSON examples for popular rich text editors (TipTap, Quill, Slate)
