Anthropic Tool Use Schema Builder and Validator Tool - Build and Validate Claude Function Calling Definitions

First Published:
Last Updated:

Build a Claude (Anthropic Messages API) tool use (function calling) definition from a form, then copy the tools array and tool_choice for your request. Paste an existing definition into the Validator to check its syntax, schema, and common mistakes.

All processing is performed entirely in your browser using client-side JavaScript. No data is transmitted to any server, and this tool never calls the Anthropic API. Your definitions never leave your device.

  • This tool is provided "AS IS" without any warranties of any kind.
  • The author accepts no responsibility for incorrect definitions, leaked secrets, or any other issues arising from use of this tool.
  • Tool use schemas evolve. The structure here was verified against the official Anthropic documentation as of 2026-06-23. Always cross-check the current Anthropic tool use documentation.
  • This tool does not call any API and cannot verify that Claude will accept or correctly use a given tool definition.
  • Do not enter real API keys or secrets. Tool definitions are schemas, not credentials; keep production secrets out of this screen.
  • By using this tool, you accept full responsibility for any outcomes.

This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.

tool_choice
Generated request fields (updates as you type)

This is the tools and tool_choice portion of a Messages API request body. Property values are the schema (types and constraints), not example data.


    

Paste a single tool object, an array of tools, or a full request body ({ "tools": [...], "tool_choice": {...} }). The Validator reports JSON syntax errors with line numbers, Anthropic schema checks, and common mistakes - each tagged as a spec issue or a recommended practice.

Drag and drop a .json definition here, or click to choose a file.

Features

  • Form to schema: define one or more tools with name, description, and an input_schema built from properties (type, description, required flag, enum values, array item type, and one level of nested objects), then read off the generated tools array.
  • tool_choice selector: choose auto, any, tool (with the forced tool name), or none, and optionally set disable_parallel_tool_use - exactly the four documented options.
  • strict tool use: toggle strict: true to add additionalProperties: false automatically, and let the Validator flag JSON Schema keywords that strict mode does not support.
  • Validator with three severity levels: paste a definition and get JSON syntax errors with line numbers, Anthropic schema checks (the name regex, input_schema.type must be object, required must reference defined properties, duplicate names, strict requirements), and recommendations - each tagged as a spec issue or a recommended practice.
  • input_examples support: add optional example inputs per tool; the Validator lightly checks each example against the schema, since the API rejects invalid examples.
  • Round-trip: the "Send to Builder" button imports a pasted definition into the Builder form so you can edit it visually.
  • Copy, download, and load files: one-click copy and download for the generated JSON, plus drag-and-drop or a file picker for the Validator input.
  • 100% client-side: no requests are sent and the Anthropic API is never called. Once loaded, the tool keeps working offline.

How to Use

  1. Builder: optionally load an example, then set each tool's name (must match ^[a-zA-Z0-9_-]{1,64}$) and a detailed description. Add properties and pick a type for each; for enum list the allowed values, for array pick the item type, and for object add nested properties.
  2. Mark required parameters and, if you need schema-exact tool calls, enable strict. Choose a tool_choice and copy or download the generated tools and tool_choice into your Messages API request.
  3. Validator: paste or drop a .json definition and click Validate. Review the Error, Warning, and Info results; Errors are the ones the API would reject.
  4. Edit visually: click "Send to Builder" to import the pasted definition into the Builder form.
  5. Keep secrets out. Tool definitions describe parameters; never paste real API keys or production secrets here.

About This Tool

Claude's tool use (also called function calling) lets you describe functions so Claude can decide when to call them and return a structured tool_use block your application executes. Each tool is described by a small, specific schema, and getting that schema right - the name format, a clear description, and a valid input_schema - is the difference between Claude using a tool reliably and ignoring or misusing it. This tool builds and checks that schema so you do not have to hand-write and re-verify it.

What was verified against the official Anthropic documentation (as of 2026-06-23):

  • Tool definition object - name (required, must match ^[a-zA-Z0-9_-]{1,64}$), description (recommended, detailed plaintext), input_schema (a JSON Schema object whose top-level type is object), and the optional input_examples and strict. Source: Anthropic Docs: Tool use overview and Define tools.
  • tool_choice - the four options auto, any, tool (with name), and none, plus disable_parallel_tool_use. Source: Define tools - Forcing tool use.
  • strict tool use and JSON Schema limits - strict: true needs additionalProperties: false and required; numeric and string constraints such as minimum, maximum, minLength, and pattern are not supported under strict. Source: Strict tool use.

Anthropic-defined and server tools (for example web search and code execution) are declared with a type and name only and do not take a custom input_schema; this tool focuses on building client / user-defined tools and treats recognized server-tool type values as informational in the Validator. For background on building agents and tools with Claude, see the related articles below.

Frequently Asked Questions

What is input_schema?

input_schema is a JSON Schema object that describes the parameters your tool accepts. Its top-level type must be object, with a properties map and an optional required array. Claude uses it - together with your description - to decide how to fill in the tool's arguments.

Which JSON Schema features does Claude support?

For ordinary (non-strict) tools, input_schema is broadly a standard JSON Schema and is used to guide Claude. When you enable strict: true, the supported subset is narrower: object / array / string / integer / number / boolean / null, plus enum, const, anyOf / allOf, $ref / $defs, the standard string formats, and additionalProperties: false. Numeric constraints (minimum / maximum / multipleOf), string constraints (minLength / maxLength / pattern), complex array constraints, and recursive schemas are not supported under strict; this tool's Validator flags them.

auto vs any vs tool for tool_choice?

auto (the default when tools are provided) lets Claude decide whether to call a tool. any forces Claude to call one of the provided tools, but not a specific one. tool forces a specific tool by name. none prevents tool use (the default when no tools are provided). Add disable_parallel_tool_use: true to limit Claude to at most one tool call per response. Note that with extended thinking, any and tool are not supported.

How are tool results returned to Claude?

When Claude responds with stop_reason: "tool_use" and a tool_use block, your code runs the function and sends the output back as a tool_result content block in a new user message, referencing the same tool_use_id. Set is_error: true on the tool_result when the tool failed. This tool builds the tool definitions; it does not run the loop or call the API.

Does this tool call the Anthropic API?

No. Everything runs locally in your browser. The tool generates and validates schemas only - it never sends your definitions anywhere, and it cannot confirm that Claude will accept or correctly use them. A clean validation result means the structure looks right, not that the tool will behave as intended.

Related Tools

Related Articles

Important Notes

  • Tool use schemas evolve. The structure generated by this tool was verified against the official Anthropic documentation as of 2026-06-23. Always cross-check the current Anthropic tool use documentation. This tool does not call any API and cannot verify that Claude will accept or correctly use a given tool definition.
  • Client tools only. The Builder generates client / user-defined tools (name + description + input_schema). Anthropic-defined and server tools (web search, code execution, bash, text editor, and similar) are declared with type + name only; the Validator recognizes those and skips the input_schema checks, but does not generate them.
  • The Validator is conservative. It reports clear spec violations as Errors and everything else as Warnings or Info, distinguishing spec issues from recommended practices. A clean result is not a guarantee that a definition behaves as intended.
  • Descriptions matter most. A detailed description - what the tool does, when to use it, and what each parameter means - is the single biggest factor in whether Claude uses a tool correctly. The Validator warns on missing or very short descriptions.
  • Keep secrets out of definitions. Tool definitions are schemas, not credentials. Do not paste real API keys or production secrets into this screen; use placeholders and supply real values through your own environment at runtime.

References:
Tech Blog with curated related content
Web Tools Collection

Written by Hidekazu Konishi