doc_verify
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
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Path to a PDF inside allowed --root directories (optional if doc_id is supplied). | |
| doc_id | No | Previously opened doc_id returned by doc_outline. | |
| quotes | No | Verbatim quote strings or {text, page?} objects to verify against exact PDF text. | |
| formula | No | Symbolic (e.g. 'rev - cogs') or numeric arithmetic formula recomputed deterministically via Python AST. | |
| operands | No | Optional structured operands bound to row_label, period, unit, and page for anti-laundering verification. | |
| claim_text | No | Optional natural-language claim to audit for metric/period/pp-vs-% alignment. | |
| cited_pages | No | Optional list of 1-based physical page numbers cited as evidence. | |
| claimed_unit | No | Optional unit of claimed_value (e.g., million, billion, %, pp). | |
| strict_scale | No | If true, disallow implicit 1000x/1e6x unit scaling during numeric matching. | |
| claimed_value | No | Optional claimed numeric result to check against AST recomputation. |