Skip to main content
Glama

Check a document while you work on it

check_document
Read-onlyIdempotent

Prints a document only to check it — the person sees nothing: no PDF link, no card, nothing counted to their plan's pages. Answers with its pages as pictures, which heading starts on which page (outline), what runs past the paper, fonts not found, the tag tree a screen reader gets, the standards the file declares and, on the Pro and Max plans, veraPDF's report on the standard it declares (PDF/UA-1, PDF/UA-2 or PDF/A-3a): each rule that fails, with its pages. Use it to try a layout, to find where a part lands, to fix what the validator finds; then give the person the document with render_pdf, render_template or update_document.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "check_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
htmlNoThe whole HTML document to check, as render_pdf takes it.
tagsNoThe tag tree in the answer. Default: true.
pdf_aNoDeclare PDF/A (Pro and Max plans): "3a" — ISO 19005-3 level A, tagged, includes PDF/UA-1 (archive and accessibility at once); "1b" — ISO 19005-1 level B (PDF 1.4: transparency flattened into images). A document that cannot conform is refused with the reason.
pdf_uaNoThe PDF/UA part the file declares: 1 (ISO 14289-1, PDF 1.7) — every print declares it; 2 (ISO 14289-2, PDF 2.0; Pro and Max plans). Not with pdf_a.
document_idNoOr a document by its link (or its edit link), as it is now: its source, data and standards.
preview_pagesNoWhich pages to see, 1-based; -1 is the last page. Default: page 1 and the last. Pick them by the outline of an earlier answer.
shrink_to_fitNoPrint a document wider than its page smaller, to fit, as a browser's print does: every length then prints scaled down. Default: false, lengths print at their size (20mm is 20mm). Prefer fitting the layout to the page; use this for a page made for a screen.

Output Schema

NameRequiredDescriptionDefault
tagsNoThe tag tree a screen reader gets: text (each element and its text, indented), lines, cut (when longer than shown).
notesYesFacts about this PDF: how long its link works, its mark, what was not fetched or filled.
pagesYes
outlineNoThe document's headings (h1–h6, the PDF's bookmarks) in order, each with the page it starts on: pick preview_pages by it.
previewYesWhich pages came with this answer as pictures (PNG), or why none did.
standardsNoWhat the PDF declares, read from its file: pdfUa (its PDF/UA part) and pdfA (its PDF/A part and level, e.g. "3a"), null when it declares none.
validationNoveraPDF on the standard the file declares (Pro and Max plans): profile, compliant, and the rules that fail — id (the standard's clause and test), title, plain (what it means for a reader), priority, count, pages; gated: true on another plan; error: why it could not run.
missingFontsNoFont families the document named that no face answered: their text took the next family of its list.
skippedResourcesNoImages, fonts or style sheets the server could not fetch.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered; the description adds real behavioral context beyond that — no PDF link, no card, no pages billed, and a plan-gated validator (veraPDF on Pro and Max). It stops short of describing response shape or cost/latency traits, but the coverage of side effects and entitlements is well above the annotation baseline.

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?

The most decision-relevant fact — invisible to the recipient, nothing billed — is front-loaded, and the closing sentence routes the agent onward. It is dense but somewhat run-on, stacking return contents (pictures, outline, overflow, fonts, tag tree, standards, validator report) into a single long sentence where a brief list would read faster.

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?

For a zero-required-parameter inspection tool with an output schema and full annotation coverage, the definition supplies everything an agent needs: what it produces, what it costs the user (nothing), plan limits, refusal behavior for non-conforming standards, and the natural next step.

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 baseline is 3; the schema already explains html, preview_pages, shrink_to_fit, pdf_a and pdf_ua in comparable detail. The description adds only a light hint about choosing preview pages from an earlier answer's outline and about which standards trigger the validator report, so it neither duplicates heavily nor compensates meaningfully.

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 concrete verb and resource ("Prints a document only to check it") plus the defining scope constraint: the recipient sees nothing and nothing is counted against their page plan. It also explicitly names the siblings that produce the user-visible document (render_pdf, render_template, update_document), so an agent can separate this tool from them without inspecting schemas.

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

Usage Guidelines5/5

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

Gives explicit use cases — try a layout, find where a part lands, fix what the validator finds — and an explicit hand-off condition: once the check passes, deliver the document with render_pdf, render_template or update_document. That is both a when-to-use and a when-to-stop rule, with named alternatives.

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.