Skip to main content
Glama

Check a JSON Schema, and whether OpenAI, Claude and Gemini strict modes accept it

jig_check_schema
Read-onlyIdempotent

Use when the user asks whether a JSON Schema is valid, or whether it will work with OpenAI Structured Outputs or function calling with strict: true, Claude structured outputs or strict tool use, or Gemini structured output (response_json_schema), or is writing a tool or function schema, an MCP inputSchema, a response_format, or a schema exported from Zod or Pydantic (signals: "Invalid schema for response_format", "strict mode error", "Claude returns 400 for my schema", "will this schema work with OpenAI", "Gemini ignores maxLength", "additionalProperties false", "all fields must be required"). First checks the schema against its draft: type names like "int", "required": true on a property, misspelt keywords, unresolvable $ref, invalid regex, impossible ranges. Then checks each provider's documented rules: OpenAI (every property in required, additionalProperties false on every object, root an object and not anyOf, no allOf/not/if, at most 5000 properties, 10 levels, 1000 enum values, documented formats only), Claude (additionalProperties false, no minimum/maximum/multipleOf/minLength/maxLength, minItems only 0 or 1, no recursion, at most 24 optional and 16 union-typed parameters per request, regex without lookarounds or backreferences), Gemini (minLength, maxLength, uniqueItems, minProperties and similar are dropped without an error). Returns per provider a verdict (ok, warnings, fails), each issue with its JSON Pointer path, rule, fix and the provider's doc URL, plus a converted copy the provider accepts (optional fields made required and nullable for OpenAI, unsupported constraints moved into descriptions the way the official SDK helpers do), and counts (properties, depth, optional and union-typed parameters). Example: {"schema":{"type":"object","properties":{"city":{"type":"string","maxLength":40},"days":{"type":"integer","minimum":1}},"required":["city"]},"providers":["openai","anthropic"]}. Rules are from each provider's docs, checked 2026-11-18; providers can change them, and very large schemas can still hit unpublished size limits.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "schema": "<schema>"
    },
    "name": "jig_check_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
draftNoForce a draft: 2020-12, 2019-09, 7, 6 or 4. Default: from $schema, else 2020-12.
schemaYesThe JSON Schema to check, as a JSON object (not a string).
providersNoWhich providers to check. Default: all three.
include_convertedNoInclude a converted copy for each provider that does not accept the schema as is. Default true.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/idempotent/non-destructive/closed-world, but the description adds substantial context beyond them: the exact rule sets applied per provider, the return shape (per-provider verdict of ok/warnings/fails, issues with JSON Pointer path, rule, fix, doc URL, converted copy, and counts), plus honest caveats that rules were checked on 2026-11-18 and can change and that very large schemas may still hit unpublished size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening trigger sentence is well front-loaded, but it is a single 100+ word run-on packed with parenthetical provider rule lists, which makes it dense to parse. Every clause carries real information, yet the per-provider rule enumeration could have been compressed or structured as a list for faster scanning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description takes on the return-value burden and does so fully: verdict taxonomy, issue fields, converted copy, and counts are all described. Combined with the draft/provider/convert coverage and the caveats about provider rule drift, an agent has everything needed to call and interpret this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so every parameter (schema, draft, providers, include_converted) is already documented in structured form, and the description mostly restates that. The inline example JSON usefully shows the schema object shape and a providers array, and the converted-copy explanation clarifies what include_converted yields, but there is no additional guidance on draft selection or provider-subset semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource (check a JSON Schema) and immediately scopes it to three named provider strict modes plus draft-level validity. The title/description make clear this is schema-level analysis against OpenAI/Claude/Gemini rules, not generic JSON validation, which distinguishes it from siblings like jig_validate_json or mend_outline_json without those schemas being read.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides unusually concrete invocation context: an enumerated list of user phrasings and error strings ("Invalid schema for response_format", "strict mode error", "Gemini ignores maxLength") that should trigger the tool, plus the artifact types it applies to (tool schemas, MCP inputSchema, response_format, Zod/Pydantic exports). It stops short of a when-not-to-use statement or naming an alternative tool for plain JSON validation, so it falls just below the 5 bar.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources