Skip to main content
Glama

validate_schema

Validate a JSON instance against a Draft 2020-12 JSON Schema, returning validity and error details.

Instructions

Validate a JSON instance against a JSON Schema (Draft 2020-12). Returns validity and a list of errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
schemaYes
instanceYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It usefully discloses the JSON Schema draft version and that it returns validity plus an error list, but says nothing about how malformed input is handled, whether it throws versus returning invalid, or performance limits. An output schema exists to fill in the return shape, so the added value here is modest.

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 tight sentences with zero waste; the core purpose is front-loaded and the return/version details follow. Nothing could be trimmed without losing 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?

For a simple two-parameter validator with an output schema covering return values, the description is largely sufficient, and the draft disclosure is valuable. It stops short of stating edge-case behavior for invalid or unparseable input.

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 0%, so the two parameters are documented only by bare titles 'Schema' and 'Instance'. The description's phrasing does implicitly map both names to their roles (instance validated against schema), but adds no format, encoding, or structural guidance beyond that.

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 a JSON instance against a JSON Schema') and pins the dialect with '(Draft 2020-12)'. It is clear and unambiguous, though it does not explicitly distinguish itself from siblings like test_regex or verify_math, relying on the obvious domain difference.

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

Usage Guidelines2/5

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

There is no when-to-use guidance, no prerequisites, and no exclusions or named alternatives. The use case is only implied by the verb 'Validate', leaving the agent to infer when schema validation is the right call versus check_units or test_regex.

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