get_table_of_contents
Extract and navigate PDF table of contents to quickly locate chapters, sections, and specific content within documents using customizable depth and parent filtering.
Instructions
Get the table of contents (bookmarks/outline) from a PDF.
When max_level is not specified and the TOC is very large, the depth is automatically
reduced to keep the response manageable. The response will include an
``auto_trimmed_to_level`` field and a hint when this happens.
Args:
filename: Path to a PDF file.
parent: Return only children of the entry whose title contains this string
(case-insensitive). For example, pass a chapter title to get its sections.
max_level: Only include entries up to this depth (1=chapters only, 2=sections, etc.).
When used with parent, levels are relative: 1 means direct children only,
2 means children and grandchildren, etc.Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | ||
| parent | No | ||
| max_level | No |