Skip to main content
Glama

feishu_im_user_fetch_resource

Download files or images from Feishu/Lark chat messages to local storage using user authorization. Requires message ID and file key from message APIs.

Instructions

【以用户身份】下载飞书 IM 消息中的文件或图片资源到本地文件。需要用户 OAuth 授权。

适用场景:当你以用户身份调用了消息列表/搜索等 API 获取到 message_id 和 file_key 时,应使用本工具以同样的用户身份下载资源。 注意:如果 message_id 来自当前对话上下文(用户发给机器人的消息、引用的消息),请使用 feishu_im_bot_image 工具以机器人身份下载,无需用户授权。

参数说明:

  • message_id:消息 ID(om_xxx),从消息事件或消息列表中获取

  • file_key:资源 Key,从消息体中获取。图片用 image_key(img_xxx),文件用 file_key(file_xxx)

  • type:图片用 image,文件/音频/视频用 file

文件自动保存到 /tmp/openclaw/ 下,返回值中的 saved_path 为实际保存路径。 限制:文件大小不超过 100MB。不支持下载表情包、合并转发消息、卡片中的资源。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
message_idYes消息 ID(om_xxx 格式),从消息事件或消息列表中获取
file_keyYes资源 Key,从消息体中获取。图片消息的 image_key(img_xxx)或文件消息的 file_key(file_xxx)
typeYes资源类型:image(图片消息中的图片)、file(文件/音频/视频消息中的文件)
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 and does so well. It discloses critical behavioral traits: requires user OAuth authorization, saves files automatically to /tmp/openclaw/, returns saved_path, has a 100MB file size limit, and lists unsupported resource types (emojis, merged-forward messages, card resources). This covers most key operational aspects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, usage scenarios, notes, parameter explanation, file handling, limitations). It's appropriately sized for a tool with multiple behavioral constraints, though some redundancy with schema descriptions slightly reduces efficiency.

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 no annotations and no output schema, the description provides comprehensive context: purpose, usage rules, authorization needs, file handling behavior, return value hint (saved_path), and limitations. It effectively compensates for the lack of structured metadata, though minor details like error handling could be more explicit.

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 100%, so the baseline is 3. The description adds minimal value beyond the schema: it clarifies that file_key comes from message bodies and distinguishes image_key vs. file_key, but this is largely redundant with schema descriptions. No significant semantic enhancements are provided.

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 ('download') and resources ('file or image resources from Feishu IM messages to local file'), distinguishing it from sibling tools like feishu_im_bot_image. It explicitly mentions the user OAuth requirement, which adds specificity beyond just the action.

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 ('when you have message_id and file_key from user-identity APIs') and when not to use it ('if message_id is from current conversation context, use feishu_im_bot_image instead'). It names the alternative tool and specifies the authorization difference, making it highly actionable.

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