AnchorDoc
v0.9.3Zero-LLM MCP server for long-PDF navigation, evidence localization, quote verification & AST math.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
doc_outline
Build a token-bounded L0 structural outline of a PDF (<=1,500 tokens, zero LLM calls). Returns doc_id, page count, printed-to-physical page calibration, route_hint ('read_all' or 'navigate'), and zoomable section/statement headings. Call this first once per PDF.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Heading granularity depth (1 = top-level sections & primary statements, 2–3 = finer subsections). |
doc_id | string | Opaque document handle returned by an earlier doc_outline call to avoid re-specifying path. |
max_items | integer | Maximum outline items returned to keep token usage bounded. |
page_range | array | Optional [start_page, end_page] 1-based physical page bounds to zoom into a specific section. |
path | string | Absolute or relative path to a PDF file inside allowed --root directories (required on first call if doc_id is omitted). |
doc_locate
Locate the most relevant pages and snippets in a PDF without calling any LLM (<=1,200 tokens). Combines lexical BM25-RRF, printed page references, statement-intent boosting, and table continuations. Call after doc_outline before reading pages.
| Parameter | Type | Description |
|---|---|---|
query * | string | Specific search query containing key entities, metrics, table names, or clause terms. |
doc_id | string | Previously opened doc_id returned by doc_outline. |
k | integer | Number of top candidate pages to return (1–10). |
page_range | array | Optional [start_page, end_page] 1-based physical page range to restrict search. |
path | string | Path to a PDF inside allowed --root directories (optional if doc_id is supplied). |
snippet_chars | integer | Maximum character length of each returned preview snippet. |
doc_read
Read up to 5 specific PDF pages per call (<=6,000 tokens) with stable line anchors (e.g. p12:L07) and a session duplicate-read ledger. Optionally renders page PNGs or 2x2 zoom tiles as native MCP ImageContent for charts or scanned pages.
| Parameter | Type | Description |
|---|---|---|
pages * | array | 1-based physical page numbers to read (1 to 5 pages per call). |
doc_id | string | Previously opened doc_id returned by doc_outline. |
force | boolean | Set true to re-return pages already recorded in the session read ledger. |
image | string | Visual rendering mode: 'false' (text only), 'page' (full-page PNG), or 'tiles' (2x2 high-res zoom crops). |
line_range | array | Optional [start_line, end_line] 1-based line bounds within each requested page. |
max_chars_per_page | integer | Character cap per page to protect context window budget. |
path | string | Path to a PDF inside allowed --root directories (optional if doc_id is supplied). |
doc_verify
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.
| Parameter | Type | Description |
|---|---|---|
cited_pages | array | Optional list of 1-based physical page numbers cited as evidence. |
claim_text | string | Optional natural-language claim to audit for metric/period/pp-vs-% alignment. |
claimed_unit | string | Optional unit of claimed_value (e.g., million, billion, %, pp). |
claimed_value | number | string | Optional claimed numeric result to check against AST recomputation. |
doc_id | string | Previously opened doc_id returned by doc_outline. |
formula | string | Symbolic (e.g. 'rev - cogs') or numeric arithmetic formula recomputed deterministically via Python AST. |
operands | array | Optional structured operands bound to row_label, period, unit, and page for anti-laundering verification. |
path | string | Path to a PDF inside allowed --root directories (optional if doc_id is supplied). |
quotes | array | Verbatim quote strings or {text, page?} objects to verify against exact PDF text. |
strict_scale | boolean | If true, disallow implicit 1000x/1e6x unit scaling during numeric matching. |