get_doc_blocks
Retrieve the full structured block tree of a Feishu document, including block types, content, and hierarchy. Handles pagination automatically to return all blocks, with optional max_blocks and page_token for bounded retrieval.
Instructions
[Official API] Get structured block tree of a document. Returns block types, content, and hierarchy for precise document analysis. Follows pagination internally and returns ALL blocks by default — hasMore:false in the response guarantees the complete tree (pre-v1.3.17 silently capped at 500 blocks). For very large docs, pass max_blocks to bound one call (rounded up to 500/page granularity) and page forward by passing the returned nextPageToken back as page_token; a bounded response carries truncated:true + hasMore:true so partial output is never silent.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_blocks | No | Soft cap on blocks returned in this call (rounded up to page granularity of 500). Omit to fetch the entire document. | |
| page_token | No | Resume cursor — pass the nextPageToken from a previous truncated response to fetch the next slice. | |
| document_id | Yes | Document ID (from search_docs or create_doc) |