Skip to main content
Glama

Validate JSON against a schema

validate
Read-onlyIdempotent

Check whether a JSON object conforms to a JSON schema (or a built-in schema_id template) and get back a valid flag plus per-field errors. Use this to verify data you already hold — a prior parse result, your own output, or an upstream feed — before acting on it or spending a credit. Deterministic, free, and needs no API key.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesThe JSON value to validate.
schemaNoJSON Schema to validate against. Takes precedence over schema_id.
schema_idNoBuilt-in template id to validate against instead of a hand-written schema (invoice, receipt, resume, etc.). Call list_schemas for the full set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, and non-destructive behavior; the description adds useful context: result contains a valid flag plus per-field errors, and the call is deterministic, free, and key-less. No contradiction with annotations.

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 with no filler: the first explains operation and results, the second gives usage context and cost/side-effect guarantees. Key information is front-loaded and every clause earns its place.

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 read-only validation tool, the description covers return format, use cases, and behavior sufficiently, and annotations cover the safety profile. It does not explain behavior when neither schema nor schema_id is supplied, but this is a minor edge case given the schema marks them optional.

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 the schema already documents all three parameters, including schema taking precedence over schema_id. The description only lightly maps schema_id to 'built-in template' without adding new semantic detail, so the baseline 3 is appropriate.

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?

The description uses a specific verb ('check whether') and names the exact resource ('JSON object' vs. a 'JSON schema' or 'schema_id template'), plus the output shape ('valid flag plus per-field errors'). It is clearly distinct from siblings like parse_document or infer_schema, which perform different operations.

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?

It gives concrete conditions: verify data you already hold from a prior parse result, own output, or upstream feed, before acting or spending credits. It implies not for parsing or extracting data, though it does not explicitly name alternative tools or exclusions.

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.