Skip to main content
Glama

IA-QA — 152 QA & Dev Tools for AI Agents

llm_json_schema_check

Read-onlyIdempotent

Validate that an LLM JSON output matches a JSON Schema definition. Tests required fields, types, enums, nested objects, and arrays. Critical for function-calling and structured output testing.

Input Schema

NameRequiredDescriptionDefault
outputYesThe LLM JSON output (raw string, will be parsed)
schemaYesJSON Schema (draft-07 subset) to validate against

Output Schema

NameRequiredDescriptionDefault
validNo
errorsNo
error_countNo
parse_errorNo
parsed_typeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "output": "{\"name\":\"a\",\"age\":3}",
      +    "schema": {
      +      "properties": {
      +        "age": {
      +          "minimum": 0,
      +          "type": "integer"
      +        },
      +        "name": {
      +          "type": "string"
      +        },
      +        "role": {
      +          "enum": [
      +            "admin",
      +            "user"
      +          ]
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "age"
      +      ],
      +      "type": "object"
      +    }
      +  }
      +]
  2. Changed1 schema field changed
    • addedOutput schema / properties
      Added value: +{
      +  "error_count": {
      +    "type": "number"
      +  },
      +  "errors": {
      +    "type": "array"
      +  },
      +  "parse_error": {},
      +  "parsed_type": {},
      +  "valid": {
      +    "type": "boolean"
      +  }
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / schema / additionalProperties
      Added value: +true
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "type": "object"
      +}
  5. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is covered. The description adds the useful detail that the output is a raw string that gets parsed and enumerates which schema constructs are checked, but says nothing about failure behavior (throw vs. return error list) or what constitutes a pass/fail result beyond the output schema.

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

Conciseness4/5

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

Three short sentences, front-loaded with the core action before the enumerated checks and use case. Nothing is redundant, though the third sentence is more marketing than operational information.

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

Completeness4/5

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

An output schema exists, so return values need not be explained, and both parameters are fully documented in the schema. What remains missing is sibling differentiation against a crowded field of JSON/LLM validators, which is the main gap for an agent choosing among them.

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 both parameters are already documented including 'raw string, will be parsed' and 'draft-07 subset'. The description adds no format, escaping, or subset-limit detail beyond what the schema states, so the baseline 3 applies.

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

Purpose4/5

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

States a specific verb and resource: 'Validate that an LLM JSON output matches a JSON Schema definition', plus the concrete checks it performs (required fields, types, enums, nested objects, arrays). However, it never distinguishes itself from close siblings like json_schema_validate, llm_output_validator, or llm_format_check, so an agent cannot tell which to pick from the description alone.

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

Usage Guidelines3/5

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

'Critical for function-calling and structured output testing' implies when the tool is relevant, but there is no explicit when-to-use vs. when-not, and no named alternative among the many overlapping validation siblings. The routing decision is left to inference.

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.