Skip to main content
Glama

download_message_resource

Download an image or file attached to a Feishu message. Use to store or view the attached resource, with optional local save for large payloads.

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
message_idYesMessage ID (om_xxx). For merge_forward children, use the child's `parentMessageId`.
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).
Behavior5/5

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

Discloses behavioral traits: images get inline content block, files get base64 truncated + optional save_path write, size cap rationale, and merge_forward quirk. No annotations provided, so description fully covers transparency.

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?

Well-structured with purpose first, then details, then warnings. Slightly long but every sentence earned its place; no redundancy.

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?

Complete for a complex tool: covers image vs file handling, size cap, merge_forward edge case. No output schema but return behavior is described (inline image block, base64, save_path).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Adds meaning beyond schema: explains message_id for merge_forward, key format (img_xxx vs file_key), save_path requirement when >2 MiB. Schema coverage is 100%, but description enriches context.

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?

Clearly states it downloads an image or file attached to a message, with specific references to 'see / store it'. Distinguishes from sibling 'download_doc_image' by focusing on message attachments.

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?

Provides explicit guidance: when to use (model needs to see/store), size cap (>2 MiB requires save_path), merge_forward children use parentMessageId, and fallback behavior ('UAT-first, falls back to app').

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