Problem
The get_pdf_outline tool can return responses that are too large for the MCP context, especially for PDFs with extensive table of contents or deeply nested bookmark structures. This causes failures when the response exceeds context limits.
Proposed Solution
Add chunking/offset parameters to get_pdf_outline similar to how other tools handle large responses:
offset: Starting index for outline entries (default: 0)
limit: Maximum number of outline entries to return (default: all)
- Include metadata about total entries and whether more are available
Example Usage
// Get first 50 outline entries
get_pdf_outline({ path: "document.pdf", offset: 0, limit: 50 })
// Get next 50 outline entries
get_pdf_outline({ path: "document.pdf", offset: 50, limit: 50 })
Implementation Notes
- Should maintain hierarchical structure even when chunking
- Consider depth-based chunking as an alternative (e.g., only return top N levels)
- Add response metadata indicating if more entries are available
- Preserve parent-child relationships in chunked responses
Priority
Medium - affects usability with large PDFs that have extensive outlines
Problem
The
get_pdf_outlinetool can return responses that are too large for the MCP context, especially for PDFs with extensive table of contents or deeply nested bookmark structures. This causes failures when the response exceeds context limits.Proposed Solution
Add chunking/offset parameters to
get_pdf_outlinesimilar to how other tools handle large responses:offset: Starting index for outline entries (default: 0)limit: Maximum number of outline entries to return (default: all)Example Usage
Implementation Notes
Priority
Medium - affects usability with large PDFs that have extensive outlines