Skip to main content
Glama

写入飞书文档

write_feishu_doc

Write Markdown content to Feishu docs by creating new documents, appending, replacing full content, or swapping exact text for targeted edits.

Instructions

写入飞书云文档(docx / wiki),内容用 Markdown。模式:create=新建文档(需 title);append=在文末追加;replace=整篇覆盖已有文档(慎用,会丢弃原有内容);replace_text=把文档中的精确旧文本替换为新文本(适合小改动)。新建成功返回新文档的 url 和 document_id。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docNo目标文档 URL 或 token(append/replace/replace_text 必填)
modeYes写入模式
titleNo文档标题(create 必填)
contentNoMarkdown 内容(create 可选只建空文档;append/replace 必填)
patternNoreplace_text 必填:要被替换的旧文本(需与文档中的文本精确一致)
parent_tokenNocreate 可选:父文件夹 token 或知识库节点 token,不传则建在个人空间

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses the destructive nature of replace (discards original content) and clarifies that replace_text requires exact text matching. It also states the create return value. It doesn't cover auth, rate limits, or error cases, but the key side effects are transparent.

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 single paragraph that front-loads the core purpose and efficiently lists all modes with their constraints. Every sentence contributes useful behavioral or semantic information; there is no redundancy or filler.

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

Completeness3/5

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

The description explains create's return value but is silent about append/replace/replace_text return values or error behavior. With no output schema and no annotations, this leaves some ambiguity for an agent. However, the mode semantics and destructive warnings cover the most critical operational aspects.

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 provides 100% parameter coverage, so the baseline is 3. The description adds substantial meaning beyond the schema by explaining the mode enum values in detail, noting that content is Markdown, and emphasizing that pattern must match exactly. This goes beyond the bare schema 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 identifies the tool's purpose: writing Markdown content to Feishu cloud documents (docx/wiki). It enumerates four distinct modes (create, append, replace, replace_text), each with a specific verb and resource, and the modes naturally distinguish it from sibling read/search/sheet tools.

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?

The description provides explicit guidance on when to use each mode, including a caution for replace ('慎用') and a recommendation for replace_text for small changes. It does not explicitly name alternative sibling tools or conditions to avoid this tool, but the mode-level guidance is strong enough to route correct usage.

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