Feishu Document Tool
Single tool feishu_doc with an action parameter for all Feishu Docx operations. Extract doc_token from URL: https://xxx.feishu.cn/docx/ABC123def -> token is ABC123def.
Workflow
- Extract
doc_tokenfrom the Feishu document URL. - Read the document to understand current content:
{ "action": "read", "doc_token": "ABC123def" } - Check the
hintfield in the response — if present, structured content (tables, images) exists; uselist_blocksto access it. - Apply changes using the appropriate action (write, append, create, update_block, create_table, etc.).
- Verify the result by re-reading the document.
Actions Summary
| Action | Description |
|---|---|
read |
Get title, plain text, block statistics |
write |
Replace entire document with markdown |
append |
Append markdown to end of document |
create |
Create new document (always pass owner_open_id) |
list_blocks |
Get full block data including tables and images |
get_block |
Read a single block by ID |
update_block |
Update text content of a block |
delete_block |
Delete a block by ID |
create_table |
Create a Docx table block |
write_table_cells |
Write values to table cells |
create_table_with_values |
Create table and fill cells in one step |
upload_image |
Upload image from URL or local path |
upload_file |
Upload file attachment from URL or local path |
Key Constraints
- Markdown tables not supported in
write/append— usecreate_tableactions instead. - Always pass
owner_open_idwhen creating documents so the user getsfull_access(otherwise only the bot has access). - Image display size follows uploaded pixel dimensions — scale small images to 800px+ width before uploading.
- For uploads, provide exactly one of
urlorfile_path; do not send both. parent_block_idand positional fields such asindexare optional and should only be used when placement must be explicit.feishu_wikidepends on this tool for reading/writing wiki page content.
References
references/block-types.md— complete block type table, editing guidelines, and common patterns.- See also:
references/action-examples.mdfor full JSON examples of each action.
Configuration
channels:
feishu:
tools:
doc: true # default: true
Required permissions: docx:document, docx:document:readonly, docx:document.block:convert, drive:drive.
Guardrails
- Use local or trusted tools only; avoid untrusted install pipelines.
- Do not paste secrets/tokens into chat output.
- Keep outputs in deterministic local paths for reproducible review.