Skip to main content
Glama

download_message_resource

Download an image or file attached to a Feishu message so the model can view it inline or store it locally via an optional save path.

Instructions

[User Identity / Official API] Download an image or file attached to a message so the model can see / store it. v1.3.7 (C2.4) consolidates the v1.3.6 download_image (mode 1) + download_file. UAT-first, falls back to app.

For images, the response includes an inline image content block so the model sees pixels. For files, the response includes the bytes as base64 (truncated for display) plus an optional save_path write.

Size cap: payloads > 2 MiB MUST pass save_path. The Anthropic API rejects responses > 5 MB; we cap at 2 MiB so multipart wrapping has headroom.

merge_forward children: Feishu keys media by the parent merge_forward id, not the child id. Use the child's parentMessageId field (returned by read_messages with expand_merge_forward) — not the child id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesimage_key (img_xxx) for kind=image, file_key for kind=file. From read_messages content.
kindYesimage or file
save_pathNoAbsolute local path. Required when downloaded bytes > 2 MiB (else the response would exceed the Anthropic API 5 MB inline limit).
message_idYesMessage ID (om_xxx). For merge_forward children, use the child's `parentMessageId`.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It fully explains the response format for both images and files, the size limits and API constraints, the save_path mechanism, and the merge_forward id handling. This is rich, specific behavioral context beyond what annotations would typically provide.

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 well-structured with clear sections, uses bold headers for emphasis, and every sentence adds necessary information. It covers complex behavior in a compact, scannable format without fluff.

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

Completeness5/5

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

For a tool with no output schema and no annotations, this description is remarkably complete. It addresses output format, size constraints, file vs image distinction, and a non-obvious merge_forward edge case. It leaves no critical gap for an agent to invoke the tool correctly.

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?

Schema coverage is 100%, but the description adds valuable semantic context: it explains the 2 MiB threshold for save_path, the parentMessageId requirement for merge_forward children, and why the size cap exists. This goes beyond the schema's parameter descriptions by linking parameters to real-world constraints and edge cases.

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 downloads an image or file attached to a message so the model can see or store it. It distinguishes itself from related tools like download_doc_image and upload_file by specifying the resource type (message attachments) and the dual output modes (image vs file).

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 clear context on when to use the tool and critical operational guidance (size cap threshold, save_path requirement, merge_forward special case). It does not explicitly compare to sibling tools or state when not to use it, but it effectively implies this is the consolidated replacement for download_image and download_file.

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/EthanQC/feishu-user-plugin'

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