Skip to main content
Glama

doc_outline

Read-onlyIdempotent

Build a token-bounded structural outline of a PDF to map sections and statements, get page calibration, and choose read-all or navigation routes before deeper reading.

Instructions

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.

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_outline"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoAbsolute or relative path to a PDF file inside allowed --root directories (required on first call if doc_id is omitted).
depthNoHeading granularity depth (1 = top-level sections & primary statements, 2–3 = finer subsections).
doc_idNoOpaque document handle returned by an earlier doc_outline call to avoid re-specifying path.
max_itemsNoMaximum outline items returned to keep token usage bounded.
page_rangeNoOptional [start_page, end_page] 1-based physical page bounds to zoom into a specific section.

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 declare readOnly, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely non-structured behavior: a hard ~1,500-token output ceiling, zero LLM calls (cost/latency), and that doc_id is a reusable handle for later calls. It omits failure behavior for non-PDF paths or invalid page ranges, which prevents a 5.

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 sentences, no filler, and the highest-value constraint (token-bounded outline) plus the ordering instruction ('call this first once per PDF') are front-loaded. Every clause carries information an 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?

With no output schema, the description compensates by enumerating the return fields and their purpose, which is exactly what an agent needs before committing to a read strategy. Minor gap: no stated behavior on invalid path, non-PDF input, or encrypted files.

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 every parameter including depth, max_items and page_range is already documented at the field level. The description only indirectly reinforces semantics via phrases like 'zoomable' and 'token-bounded'. Baseline 3 applies because the schema, not the description, carries the parameter meaning.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: builds a token-bounded L0 structural outline of a PDF, and enumerates what the result contains (doc_id, page count, page calibration, route_hint, headings). That is far more than a restatement of the name. It does not name any sibling (doc_locate, doc_read, doc_verify), so differentiation from alternatives is only implied by 'Call this first once per PDF'.

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 clear invocation context: call it first, exactly once per PDF, because the returned doc_id and route_hint drive later steps. The 'read_all' vs 'navigate' route hint implies a decision tree but the description never names the downstream tool to use in each branch, so alternatives remain implicit rather than explicit.

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