Skip to main content
Glama

Read a PDF outline

pdf_outline
Read-only

Read a PDF's table of contents as a flat list with titles, depth, and real page numbers to locate the section covering a topic, then read or render just those pages.

Instructions

Read a PDF's table of contents (bookmarks) as a flat list with real page numbers.

This is the navigation index for reading: each entry has a 1-based index, a depth (1 = top level), its title, and the 1-based page it starts on. Use it to find the section that covers a topic, then read or render just those pages.

Not every PDF has a usable outline — a scanned book often does, a print-to-PDF rarely does. When total is 0, fall back to pdf_read or pdf_render_page over page ranges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoLast outline entry to return, inclusive.
fromNoFirst outline entry to return, 1-based (default 1).
pathYesPath to the PDF.
max_depthNoOnly include entries at or above this depth (1 = top level only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare readOnlyHint and openWorldHint, but the description adds real behavioral context: entries carry index/depth/title/page, outlines are unreliable ('a scanned book often does, a print-to-PDF rarely does'), and total==0 is the signal to fall back. It discloses return-field semantics and a failure mode that the annotations cannot.

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?

Three short paragraphs, front-loaded with purpose then usage then caveat. Every sentence earns its place; no filler or repetition of the name.

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

Completeness5/5

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

There is no output schema, so the description correctly takes on the burden of explaining the returned entry fields and the empty-outline case. An agent has everything needed to call it and interpret the result.

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 from/to/max_depth/path are already documented in the schema, and the description does not elaborate on their syntax or interaction. Baseline 3 applies; the description's discussion of entry fields is about output, not input parameters.

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+resource ('Read a PDF's table of contents (bookmarks)') and even characterizes the exact shape of the result (flat list with 1-based index, depth, title, page). This is clearly distinguishable from pdf_read and pdf_render_page, which it names.

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

Usage Guidelines5/5

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

Explicitly frames the tool as 'the navigation index for reading' and tells the agent to use it to find a section then 'read or render just those pages.' It also gives the negative condition and the fallback: when total is 0, use pdf_read or pdf_render_page over page ranges.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.