--- title: Indexing Large Documents description: Efficiently access huge documents without loading everything at once. --- import { Aside } from '@astrojs/starlight/components'; # Indexing Large Documents > *"It's not that I'm lazy, it's that I just don't care about loading 500 pages at once."* For documents over 25,000 tokens, the indexing system enables on-demand fetching through MCP resources. ## Quick Example ```python # Index once result = await index_document("huge-novel.docx") # Returns: {"doc_id": "abc123", "resources": {...}} # Fetch chapters on demand # chapter://abc123/1 → Chapter 1 # chapter://abc123/1.md → Chapter 1 as Markdown ``` ---
*Full tutorial coming soon.*