Skip to main content
Glama

doc_read

Read-onlyIdempotent

Read up to five specific PDF pages with stable line anchors and session duplicate-read tracking; optionally render page PNGs or zoom tiles for charts and scanned pages.

Instructions

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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "pages": "<pages>"
    },
    "name": "doc_read"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoPath to a PDF inside allowed --root directories (optional if doc_id is supplied).
forceNoSet true to re-return pages already recorded in the session read ledger.
imageNoVisual rendering mode: 'false' (text only), 'page' (full-page PNG), or 'tiles' (2x2 high-res zoom crops).false
pagesYes1-based physical page numbers to read (1 to 5 pages per call).
doc_idNoPreviously opened doc_id returned by doc_outline.
line_rangeNoOptional [start_line, end_line] 1-based line bounds within each requested page.
max_chars_per_pageNoCharacter cap per page to protect context window budget.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well past the annotations by disclosing the session duplicate-read ledger (repeat reads are suppressed unless force=true), the ~6,000-token per-call budget, the line-anchor format, and that images are returned as native MCP ImageContent. These are behavioral traits an agent cannot derive from readOnly/idempotent hints alone.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences with zero filler, front-loading the core action and limits before the optional image mode. Every clause carries a constraint or capability the agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a read-only tool with full annotation coverage and complete schema descriptions, this is nearly sufficient: it explains the cap, dedup ledger, anchors, and image output. Only minor gaps remain, such as how text and anchors interleave in the response and what happens when a requested page is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the token-budget rationale behind the page cap, the anchor format produced by reads, the purpose of tiling for charts/scans, and that doc_id originates from doc_outline. line_range and max_chars_per_page semantics are left entirely to the schema.

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 ('Read up to 5 specific PDF pages per call') with concrete scope limits (<=6,000 tokens) and output characteristics (stable line anchors like p12:L07). It also ties doc_id to doc_outline, which implicitly separates it from the outline/locate/verify siblings.

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

Usage Guidelines3/5

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

Usage context is implied by the per-call limits and the 'force' behavior for the duplicate-read ledger, but there is no explicit statement of when to prefer this over doc_locate or doc_outline, nor any when-not guidance. An agent can infer it is the page-content reader but must reason about the boundary itself.

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