Skip to main content
Glama

doc_verify

Read-onlyIdempotent

Verifies claims against source PDFs deterministically with zero LLM calls, checking quotes, numeric operands, units, periods, signs, and formula recomputation before high-stakes answers.

Instructions

Deterministically verify any claim against a source PDF with zero LLM calls. Checks sign-preserving verbatim quotes, binds numeric operands to table rows/periods/units, detects sign flips, period/unit/pp-vs-% swaps, and recomputes symbolic or numeric formulas via Python AST. Always call before finalizing high-stakes answers.

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": "doc_verify"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoPath to a PDF inside allowed --root directories (optional if doc_id is supplied).
doc_idNoPreviously opened doc_id returned by doc_outline.
quotesNoVerbatim quote strings or {text, page?} objects to verify against exact PDF text.
formulaNoSymbolic (e.g. 'rev - cogs') or numeric arithmetic formula recomputed deterministically via Python AST.
operandsNoOptional structured operands bound to row_label, period, unit, and page for anti-laundering verification.
claim_textNoOptional natural-language claim to audit for metric/period/pp-vs-% alignment.
cited_pagesNoOptional list of 1-based physical page numbers cited as evidence.
claimed_unitNoOptional unit of claimed_value (e.g., million, billion, %, pp).
strict_scaleNoIf true, disallow implicit 1000x/1e6x unit scaling during numeric matching.
claimed_valueNoOptional claimed numeric result to check against AST recomputation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world), and the description adds real value beyond them: zero LLM calls (determinism guarantee), the exact class of errors it detects, and that formulas are recomputed via Python AST. It does not disclose what a failed verification looks like or how findings are reported, which is a notable omission for a verdict-producing 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-loads the core capability in the first clause, then enumerates the checks compactly and closes with the workflow directive. The middle sentence is dense with a long list, but every listed check maps to actual functionality rather than filler.

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?

For a 10-parameter tool with no output schema, the description never explains what verification returns — pass/fail, structured findings, mismatch details — which is the central question an agent has before calling it. It does explain the input modes and the workflow trigger well, so it is adequate but leaves a meaningful gap.

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 ten parameters thoroughly, including path vs doc_id and the operand object fields. The description adds conceptual framing (sign-preserving quotes, operands bound to rows/periods/units, claimed_value checked against AST recomputation) but no format or syntax detail beyond the schema, so baseline 3 applies.

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 and resource ('deterministically verify any claim against a source PDF') and immediately enumerates the concrete checks performed (quote verification, operand binding, sign flips, period/unit/pp swaps, AST recomputation). This is clearly distinct from the doc_read/doc_outline/doc_locate siblings, which retrieve rather than verify.

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 an explicit when-to-use directive: 'Always call before finalizing high-stakes answers.' That is strong positive guidance, but there is no when-not guidance (e.g., trivial/low-stakes lookups) and no explicit named alternative for simpler retrieval needs.

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

Deploy Server

Other Tools