TOOL API

get_document_structure

Extract the hierarchical structure of a completed document. Optional: wait_for_completion (boolean) to wait up to 3 minutes if still processing. Returns structured outline with headers, sections, and page references. REQUIRED for documents over 20 pages - use this first to understand layout and identify relevant sections before extracting content. For targeted questions, use structure to locate relevant pages, then extract with get_page_content().

devOAuth1 credits

Call information

Tool slug
pageindex-mcp.get_document_structure
Provider
PageIndex
Average response
0 ms
Calls in 7 days
0

Input parameters

doc_namerequired

Copy the `name` field verbatim from a browse_documents() or search_documents() response (case-sensitive, include extension). Example: "Q3 Report.pdf". If the response shows two documents with the same name, pass `folder_id` alongside to disambiguate.

folder_id

Disambiguator for same-name documents. Copy the `folder_id` from the intended browse/search result; use "root" for root-level documents, or "shared-with-me"/"following" for the read-only folders at the library root; omit if `doc_name` is unique. Copy any folder_id verbatim from a browse_documents()/get_folder_structure() response, never construct one.

part

Part number for pagination (1-based, default 1). For large outlines, increment until the response's `pagination.has_more` becomes false.

wait_for_completion

If true and document is processing, automatically wait up to 3 minutes until completed. Reduces repeated tool calls.