Feishu Document Tool
Single tool feishu_doc with action parameter for all document operations.
Token Extraction
/docx/URL:https://xxx.feishu.cn/docx/ABC123def→doc_token=ABC123def/wiki/URL:https://xxx.feishu.cn/wiki/ABC123def→ wiki tokenABC123defcan be used directly asdoc_token(if you know it's a document). If unsure about file type, usefeishu_wikito resolve first.
Actions
Read Document
{ "action": "read", "doc_token": "ABC123def" }
Returns: title, plain text content, block statistics. Check hint field - if present, structured content (tables, images) exists that requires list_blocks.
Write Document (Replace All)
{ "action": "write", "doc_token": "ABC123def", "content": "# Title\n\nMarkdown content..." }
Replaces entire document with markdown content. Supports: headings, lists, code blocks, quotes, links, images ( auto-uploaded), bold/italic/strikethrough.
Limitation: Markdown tables are NOT supported.
Append Content
{ "action": "append", "doc_token": "ABC123def", "content": "Additional content" }
Appends markdown to end of document.
Create Document
{ "action": "create", "title": "New Document" }
With folder:
{ "action": "create", "title": "New Document", "folder_token": "fldcnXXX" }
List Blocks
{ "action": "list_blocks", "doc_token": "ABC123def" }
Returns full block data including tables, images. Use this to read structured content.
Get Single Block
{ "action": "get_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
Update Block Text
{
"action": "update_block",
"doc_token": "ABC123def",
"block_id": "doxcnXXX",
"content": "New text"
}
Delete Block
{ "action": "delete_block", "doc_token": "ABC123def", "block_id": "doxcnXXX" }
Reading Workflow
- Start with
action: "read"- get plain text + statistics - Check
block_typesin response for Table, Image, Code, etc. - If structured content exists, use
action: "list_blocks"for full data
Collaboration with Other Skills
- File operations (move/delete/copy document): Use
feishu_driveinstead - Sharing/permissions: Use
feishu_perminstead - Wiki navigation: Use
feishu_wikito list/create/move wiki nodes, then use this tool to edit content - Spreadsheet/Bitable: If the content is a table, use
feishu-sheetsorfeishu-bitableinstead
Error Handling
| Error | Meaning | Solution |
|---|---|---|
| Token not found | doc_token is wrong or is not a document | The URL might point to a sheet/bitable. Use feishu_wiki to check obj_type |
| No permission | Bot has no access | Ask user to share the document with the bot |
Permissions
Required: docx:document, docx:document:readonly, docx:document.block:convert, drive:drive