Skip to main content
Glama

get_pdf_outline

Extract the table of contents or outline structure from PDF files, returning hierarchical sections with titles and page references for document navigation.

Instructions

Extract the table of contents (TOC) or outline/bookmarks structure from a PDF file. Returns hierarchical or flattened list of document sections with titles, page references, and navigation structure. Use either absolute_path for any location or relative_path for files in ~/pdf-agent/ directory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
absolute_pathNoAbsolute path to the PDF file (e.g., '/Users/john/documents/report.pdf')
relative_pathNoPath relative to ~/pdf-agent/ directory (e.g., 'reports/annual.pdf')
use_pdf_homeNoUse PDF agent home directory for relative paths (default: true)
include_destinationsNoResolve internal destinations to page numbers when possible (default: true)
max_depthNoMaximum nesting depth to process (1-10). Optional - limits deep hierarchies
flatten_structureNoReturn flat list instead of hierarchical tree structure (default: false)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vlad-ds/pdf-agent-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server