Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
rootYesPath to the directory containing PDFs, passed to the MCP server as `--root` (for example: `anchordoc mcp --root /path/to/your/pdfs`). Only documents under this allowlisted root are accessible.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

AnchorDoc progressive PDF protocol (0 external LLM calls): 1) Call doc_outline once per document to inspect structure, page count, and route_hint. 2) Call doc_locate with specific query terms before reading pages (unless route_hint='read_all'). 3) Call doc_read on at most 5 pages per call; cite exact p.N (printed label) and pN:Lxx anchors. 4) Call doc_verify on verbatim quotes and arithmetic formulas before stating your final answer.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
experimental
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
doc_outlineA

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.

doc_locateA

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.

doc_readA

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.

doc_verifyA

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.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.3/5.0

Scored across 4 tools

Disambiguation5/5

Each tool occupies a distinct stage of a single pipeline: outline (structure), locate (retrieval), read (content), verify (claim-checking). Descriptions even sequence them explicitly ('call this first once per PDF', 'call after doc_outline'), leaving virtually no room for misselection.

Naming Consistency5/5

All four names follow the same doc_<verb> snake_case pattern (outline, locate, read, verify) and the verbs accurately reflect each action. No mixing of conventions or vague verbs.

Tool Count5/5

Four tools map cleanly onto four non-overlapping stages of a PDF analysis workflow, with no redundant or filler tools. This is a tight, well-scoped surface within the ideal 3-15 range.

Completeness4/5

The pipeline covers structure discovery, targeted retrieval, page reading, and deterministic verification, closing the loop for high-stakes document QA. Minor gaps remain, such as no tool to list or discover available documents/doc_ids or to compare across multiple PDFs, but these are workable around existing tools.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues