Skip to main content
Glama

Validate a document

validate
Read-onlyIdempotent

Prepare the document and return diagnostics. valid is true when no diagnostic has level error.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document": "<document>"
    },
    "name": "validate"
  }
}

Input Schema

NameRequiredDescriptionDefault
documentYesThe Publisle document: an object with schemaVersion and blocks, as returned by the other tools.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered. The description earns credit for disclosing return semantics that no output schema captures ("return diagnostics", and `valid` being true only when no diagnostic has level `error`), which is exactly the kind of context that matters here. However, "Prepare the document" hints at side effects or preprocessing that sit uneasily with readOnlyHint=true and is never explained, leaving ambiguity about whether the document is mutated.

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?

Two sentences, no filler, with the return-value contract front and center in the second sentence. It is efficient, though the opening clause "Prepare the document" spends words on a concept it never defines.

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

Completeness3/5

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

With no output schema, the description must carry return semantics and does so partially: it explains the `valid` flag and the existence of diagnostics, but not what a diagnostic looks like, whether diagnostics are blocking, or what validation actually covers. For a nested-object input whose whole purpose is producing structured output, this leaves the agent guessing about the result shape.

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?

One required parameter with 100% schema description coverage; the schema already explains that the document is an object with schemaVersion and blocks as returned by other tools. The description adds no syntax, format, or defaulting detail beyond that, so the baseline for a fully documented single parameter applies rather than uplift.

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

Purpose3/5

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

"Prepare the document and return diagnostics" gestures at validation and explicitly names the output (diagnostics), but the verb "prepare" is vague and never states what is being validated (schema structure, block references, link targets). Nothing in a sibling-differentiated way tells an agent this is the validation step rather than a preprocessing step for compile_pdf or render_html.

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 statement that this should be run before compile_pdf/render_html, no exclusions, no mention of what a caller should do with failures. The only implied usage is inferred from the tool name and the document parameter's schema note that it comes "as returned by the other tools."

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