Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
max_blocksNoSoft cap on blocks returned in this call (rounded up to page granularity of 500). Omit to fetch the entire document.
page_tokenNoResume cursor — pass the nextPageToken from a previous truncated response to fetch the next slice.
document_idYesDocument ID (from search_docs or create_doc)
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description fully discloses key behaviors: returns all blocks by default, hasMore:false guarantees completeness, the pre-v1.3.17 500-block cap, and the semantics of truncated:true/hasMore:true in bounded responses. It even highlights version-specific quirks, leaving no silent surprises.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a compact three-sentence paragraph that front-loads the core purpose, then delivers crucial pagination details in logical order. No filler—every sentence contributes actionable information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Despite lacking an output schema, the description explains the response shape (block types, content, hierarchy, pagination flags) and the complete behavior across versions and parameter combinations. It fully equips an agent to use the tool correctly, even for tricky large-document cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers 100% of parameters, but the description adds valuable semantics: max_blocks is a soft cap rounded to 500-page granularity, page_token is a resume cursor from nextPageToken, and document_id provenance is clarified. This goes beyond the schema's basic descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves the structured block tree of a document, listing returned content (block types, content, hierarchy) and the intended use case ('precise document analysis'). This distinguishes it from sibling tools like read_doc or read_doc_markdown, which focus on text/markdown extraction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear usage context: use for precise document analysis and when needing the complete block tree. It also explains how to handle large documents via max_blocks and page_token, giving practical guidance. However, it does not explicitly compare to alternatives or state when not to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EthanQC/feishu-user-plugin'

If you have feedback or need assistance with the MCP directory API, please join our Discord server