Skip to main content
Glama

Validate Json Schema

validate_json_schema
Read-onlyIdempotent

Validate a JSON value against a JSON Schema (draft-07 subset: type, required, properties, additionalProperties, items, enum, const, min/max, minLength/maxLength, pattern, minItems/maxItems, uniqueItems, format). Returns {valid, errors:[{path,message}]}. Keyless, offline.

Input Schema

NameRequiredDescriptionDefault
dataYesThe JSON value to validate (any type).
schemaYesThe JSON Schema to validate against.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "data": {
      +      "age": 30,
      +      "email": "john@example.com",
      +      "name": "John Doe"
      +    },
      +    "schema": {
      +      "properties": {
      +        "age": {
      +          "minimum": 0,
      +          "type": "number"
      +        },
      +        "email": {
      +          "format": "email",
      +          "type": "string"
      +        },
      +        "name": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "name",
      +        "age"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  {
      +    "data": [
      +      1,
      +      2,
      +      3,
      +      4,
      +      5
      +    ],
      +    "schema": {
      +      "items": {
      +        "type": "number"
      +      },
      +      "maxItems": 10,
      +      "minItems": 1,
      +      "type": "array"
      +    }
      +  }
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior5/5

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

While annotations declare readOnlyHint/idempotentHint, the description adds substantial context: supported draft-07 subset, offline/keyless behavior, and exact return format. This goes beyond annotations and helps predict tool behavior accurately.

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

Conciseness5/5

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

Two sentences only: first states purpose and supported keywords, second gives return format and key constraints. Every sentence earns its place with no redundancy.

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?

Given no output schema, the description fully compensates by specifying the return shape ({valid, errors}). It also covers supported subset and offline/keyless nature, making the tool fully understandable. Siblings are unrelated, so no missing context.

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

Parameters4/5

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

Schema already provides 100% coverage with descriptions for both parameters. The description enriches the schema parameter by listing supported JSON Schema keywords, clarifying which schema features are accepted, adding value beyond the structured 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?

Description clearly states the tool validates a JSON value against a JSON Schema, with a specific verb+resource. It also distinguishes itself from siblings by being a unique validation utility, not related to AI/prediction tools.

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?

The description provides context ('Keyless, offline') but doesn't explicitly state when to use this tool over alternatives or exclude any use cases. No clear sibling alternatives exist, so the guidance is implied rather than explicit.

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.