get_document_structure
Retrieve a document's section outline—titles, line ranges, token counts, and summaries—without body text to locate relevant sections before reading their content.
Instructions
Get a document's section outline — node_id, title, line range, tokens, summary — without body text. REQUIRED for documents over 15000 tokens: call this first to locate the relevant sections, then read them with get_node_content(). Returns depth levels (default 2); nodes below the cut show child_count — pass their node_id to expand that subtree. Large outlines are split into parts: increment part until pagination.has_more is false.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"doc_path": "<doc_path>"
},
"name": "get_document_structure"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| part | No | Part number for pagination (1-based, default 1). Increment until the response's `pagination.has_more` becomes false. | |
| depth | No | Number of outline levels to return (1-10, default 2). Deeper nodes are summarized by `child_count`. | |
| node_id | No | Expand only the subtree of this node (depth counts from it). Copy it verbatim from a get_document_structure() or search_documents() result; omit for the whole document. | |
| doc_path | Yes | Library-relative path of the document, copied verbatim from a browse_documents() or search_documents() result (case-sensitive, include the extension). Example: "guides/setup.md". Never construct one. |