Skip to main content
Glama

Zotero Get Pdf Outline

zotero_get_pdf_outline

Extract a PDF's table of contents as a hierarchical markdown list with page numbers, helping you navigate a paper and save tokens before reading full text.

Instructions

Extract the table of contents (outline/bookmarks) from a PDF attachment, returned as a hierarchical markdown list with each entry's page number. Use this to orient in a paper before calling zotero_get_item_fulltext — the outline is typically < 200 tokens versus 10K+ for the full text. If the PDF has no embedded outline, returns a short 'no outline' message rather than failing. item_key: the PDF ATTACHMENT key OR the parent item key — both are accepted; attachment-to-parent resolution is automatic. Find the right key with zotero_get_item_children if unsure. Scope: PDFs only (EPUBs have no outline extraction here). Requires PyMuPDF (the [pdf] extra). Read-only; works in local or web mode. Example: zotero_get_pdf_outline(item_key='RTKZQI8E').

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_keyYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the return format, the graceful handling of missing outlines, the dual key acceptance with automatic resolution, the PyMuPDF dependency, compatibility with local/web modes, and read-only nature. This is thorough and goes beyond a basic statement of function.

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?

The description is long but every sentence adds value. It front-loads the core purpose, then covers usage, parameter semantics, scope, dependencies, and an example. There is no redundancy or filler; the structure logically guides the agent from understanding to invocation.

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?

For a single-parameter tool, the description is remarkably complete. It covers the return format (hierarchical markdown with page numbers), the edge case of no outline, input key flexibility, dependency requirements, mode support, and read-only status. Given the output schema exists and the description aligns with it, nothing essential is missing for correct invocation.

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

Parameters5/5

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

The schema provides no description for the single parameter item_key (0% coverage). The description compensates fully by explaining that it accepts either the PDF attachment key or the parent item key, that resolution is automatic, and how to find the correct key using zotero_get_item_children. This adds crucial meaning beyond the bare 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?

The description clearly states the tool extracts the table of contents from a PDF attachment and returns a hierarchical markdown list with page numbers. It uses specific verbs and resources, and distinguishes itself from zotero_get_item_fulltext by positioning it as a lightweight orienting step. The purpose is unambiguous and well-differentiated from sibling tools.

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?

The description explicitly recommends using this tool before zotero_get_item_fulltext, with a concrete rationale (token size comparison: <200 vs 10K+). It also states the PDF-only scope and that it returns a friendly 'no outline' message instead of failing, which guides when to expect success or failure. No alternatives are named for EPUBs, but the exclusion is clear.

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