Index PDF Document
index_documentConvert a local PDF into a hierarchical PageIndex tree for navigation and content extraction without LLM calls during search.
Instructions
Converts a local PDF into a PageIndex hierarchical tree structure. This is a one-time operation per document. Requires: PAGEINDEX_REPO_PATH env var pointing to cloned VectifyAI/PageIndex repo, and OPENAI_API_KEY for tree generation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | Unique identifier for this document (alphanumeric, hyphens, underscores) | |
| pdf_path | Yes | Absolute path to the PDF file on local filesystem | |
| toc_check_pages | No | Pages to scan for table of contents (default: 20) | |
| max_pages_per_node | No | Max pages per tree node (default: 10) |