Skip to main content
Glama

读文档结构化块

feishu_doc_blocks
Read-only

Read a Feishu document as structured blocks with block IDs, types, and extracted text, so you can locate specific paragraphs or tables and run precise block-level operations.

Instructions

按块(block)读一篇云文档的结构:每块有 block_id、block_type 与内容。和 feishu_doc_read 的区别:doc_read 给的是拼接好的纯文本,适合通读;doc_blocks 保留段落/标题/表格/图片块的分块结构,适合定位「第几段」「哪个表格」以及后续按 block_id 做精细操作。飞书文档的块类型是数字编码(如 2=文本、3-11=各级标题、31=表格),本工具会把能识别的文字内容抽出来,识别不了的块只给类型码。

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": {
      "document_id": "<document_id>"
    },
    "name": "feishu_doc_blocks"
  }
}

Input Schema

NameRequiredDescriptionDefault
max_pagesNo最多翻几页,默认 3(防止超大文档一次拉爆)
page_sizeNo每页块数,默认 200,最大 500
document_idYes文档 id(docx 链接里 /docx/ 后面那串,不是整个 URL)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered; the description adds genuinely new behavior: block types are numeric codes (2=文本, 3-11=标题, 31=表格) and extraction is lossy — unrecognized blocks yield only a type code. It does not say what happens when max_pages is exhausted (e.g., whether truncation is signaled), which is the remaining behavioral gap.

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?

Three sentences, zero filler: purpose first, sibling differentiation second, output caveat third. The numeric block-type examples are compact and load-bearing rather than decorative.

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

Completeness4/5

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

With no output schema, the description carries the return-shape burden and does so well (block_id, block_type, extracted text, lossy fallback). It stops short of describing pagination/multi-page result behavior, which matters given max_pages and page_size exist.

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

Parameters3/5

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

Schema coverage is 100%, so document_id, max_pages and page_size (with defaults and limits) are already fully documented. The description adds no meaning beyond the schema for any parameter, so the baseline 3 applies.

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?

States a specific verb and resource (按块读一篇云文档的结构) and immediately names the returned fields (block_id、block_type、内容). It explicitly contrasts with feishu_doc_read, so an agent can distinguish the two without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit when-to-use split: doc_read for 通读 plain text, doc_blocks for 定位「第几段」「哪个表格」 and follow-up operations by block_id. The alternative and the condition that selects it are both named.

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