Skip to main content
Glama

Validate a payload against a template

validate_data
Read-only

Dry-run a data payload against a template's JSON Schema and get back exactly the errors a render would raise — field path, expected type, what was received and a value that would be accepted. Costs nothing and renders nothing. Use it before a batch, or whenever you are assembling a payload from somewhere you do not control. warnings lists fields the template would not use, each with a did_you_mean where there is a near match, and, where the template's schema declares lang, what data.lang would do.

Input Schema

NameRequiredDescriptionDefault
dataYesThe payload you intend to render. Checked against the template's JSON Schema; fields it does not use come back in `warnings`, not as errors. `lang` and `labels` at the root are honoured only if the template's schema declares them (check get_template); otherwise they are ordinary unknown fields.
templateYesTemplate to use: `invoice` for the latest version, or `invoice@3` to pin version 3. Pin the version in anything you ship — a new version changes the output and the cache key. Call list_templates to see what this account has.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / data / description
      Previous value: -"The payload you intend to render. Checked against the template's JSON Schema and nothing else."New value: +"The payload you intend to render. Checked against the template's JSON Schema; fields it does not use come back in `warnings`, not as errors. `lang` and `labels` at the root are honoured only if the template's schema declares them (check get_template); otherwise they are ordinary unknown fields."
  2. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only say readOnlyHint and openWorldHint; the description goes well beyond by stating no cost, no render, the exact error shape (field path, expected type, received value, acceptable value), the `warnings` structure with `did_you_mean`, and the conditional handling of `lang`. That is rich, decision-relevant behavior for a validation tool.

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?

Front-loaded with the core action and its zero-cost guarantee, then the return contract. Three dense sentences; the first is long but every clause carries information, so there is little waste.

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?

No output schema exists, and the description compensates fully by describing both the error payload and the `warnings` list, plus cross-references (get_template, list_templates) for the schema-dependency caveat. An agent has everything needed to call it correctly.

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 coverage is 100%, establishing a baseline of 3, but the description adds meaning the schema does not: `lang`/`labels` at the root are honoured only if the template's schema declares them, otherwise they surface as unknown fields. That clarifies actual param behavior beyond the field descriptions.

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+resource: dry-run a `data` payload against a template's JSON Schema and return the errors a render would raise. 'Costs nothing and renders nothing' cleanly separates it from the sibling `render` tool without needing the schema.

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?

Gives clear usage contexts: 'Use it before a batch, or whenever you are assembling a payload from somewhere you do not control.' It implies the render alternative by describing exactly the errors a render would raise, but never names `render` explicitly as the tool it substitutes for.

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