Skip to main content
Glama

feishu_doc_media

Manage media in Feishu/Lark documents by inserting local images/files or downloading document assets/whiteboard thumbnails to your local system.

Instructions

【以用户身份】文档媒体管理工具。支持两种操作:(1) insert - 在飞书文档末尾插入本地图片或文件(需要文档 ID + 本地文件路径);(2) download - 下载文档素材或画板缩略图到本地(需要资源 token + 输出路径)。

【重要】insert 仅支持本地文件路径。URL 图片请使用 create-doc/update-doc 的 语法。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYes
doc_idNo文档 ID 或文档 URL(必填)。支持从 URL 自动提取 document_id
file_pathNo本地文件的绝对路径(必填)。图片支持 jpg/png/gif/webp 等,文件支持任意格式,最大 20MB
typeNo媒体类型:"image"(图片,默认)或 "file"(文件附件)
alignNo对齐方式(仅图片生效):"center"(默认居中)、"left"(居左)、"right"(居右)
captionNo图片描述/标题(可选,仅图片生效)
resource_tokenNo资源的唯一标识(file_token 用于文档素材,whiteboard_id 用于画板)
resource_typeNo资源类型:media(文档素材:图片、视频、文件等)或 whiteboard(画板缩略图)
output_pathNo保存文件的完整本地路径。可以包含扩展名(如 /tmp/image.png),也可以不带扩展名,系统会根据 Content-Type 自动添加
Behavior4/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It effectively describes key behaviors: the two distinct operations (insert/download), file size limits (20MB), supported formats for images, and the important constraint that insert only works with local files. It doesn't mention authentication requirements or rate limits, but covers essential operational constraints.

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 efficiently structured with two clear sections: an overview of the two operations, followed by an important constraint note. Every sentence serves a purpose - the first explains what the tool does, the second provides critical usage guidance. No wasted words or redundant information.

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?

For a tool with 9 parameters, no annotations, and no output schema, the description does well to cover the essential context. It explains the two main operations, their requirements, and key constraints. However, it doesn't describe what the tool returns (output format) or error conditions, which would be helpful given the absence of output schema.

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 description coverage is high at 89%, so the baseline is 3. The description adds some value by clarifying that 'insert requires document ID + local file path' and 'download requires resource token + output path', but doesn't provide significant additional parameter semantics beyond what's already well-documented in the schema properties.

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's purpose with specific verbs ('insert' and 'download') and resources ('local images or files', 'document materials or whiteboard thumbnails'). It distinguishes this tool from siblings like 'feishu_create_doc' and 'feishu_update_doc' by specifying it handles local file operations rather than URL-based media insertion.

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?

The description provides explicit guidance on when to use this tool versus alternatives. It states 'insert only supports local file paths' and directs users to 'use create-doc/update-doc' for URL images, naming specific sibling tools. This clearly defines the scope and appropriate alternatives.

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/WilliamMo101/lark-hermes-mcp'

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