Skip to main content
Glama

Message: Get attachment

message_get_attachment
Read-onlyIdempotent

Download one exact attachment from a WhatsApp, Instagram, Telegram or LinkedIn message (for example a voice note or an image) as base64 bytes with its content type. Required chain: resolve/list chat -> chat_id -> get/list message -> attachment.id -> retrieve. All three IDs (chat_id, message_id, attachment_id) are required because attachment identity is scoped to its message. Chat ID: Exact provider chat/conversation ID. LinkedIn chat IDs may also be visible in /messaging/thread/{chat_id}/ URLs. Obtain with: provider list conversations/inbox chats -> chat.id Never pass: person name, user_id, message_id. Message ID: Exact message id inside a specific chat. In V2 always keep chat_id together with message_id because providers may only guarantee uniqueness inside the chat. Obtain with: provider read/list conversation messages -> message.id Never pass: message text, chat_id, message ID without its chat context for mutation tools. Attachment ID: Exact attachment id returned inside a specific email/message. Obtain with: read the parent email/message first -> attachment.id Never pass: filename, URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chat_idYesExact chat/conversation ID from a conversation/chat listing or resolver. A person name/user_id is NOT a chat_id. Chat ID: Exact provider chat/conversation ID. LinkedIn chat IDs may also be visible in /messaging/thread/{chat_id}/ URLs. Obtain with: provider list conversations/inbox chats -> chat.id Never pass: person name, user_id, message_id.
account_idNoOptional Nilyo connection ID (unipile_account_id from list_connected_accounts). Omit when the user has one account for this provider. When several exist, Nilyo never guesses: list them (display name, identifier, provider user ID), choose the one the user named or ask, and pass its ID here.
message_idYesExact message ID returned inside the specified chat. Keep it paired with chat_id for all V2 message mutations/reactions. Message ID: Exact message id inside a specific chat. In V2 always keep chat_id together with message_id because providers may only guarantee uniqueness inside the chat. Obtain with: provider read/list conversation messages -> message.id Never pass: message text, chat_id, message ID without its chat context for mutation tools.
attachment_idYesExact attachment ID from the already-read parent message (e.g. a WhatsApp/Telegram voice note or image). Never use filename or a provider URL as attachment_id. Attachment ID: Exact attachment id returned inside a specific email/message. Obtain with: read the parent email/message first -> attachment.id Never pass: filename, URL.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint/idempotentHint true and destructiveHint false, so there is no safety contradiction. The description adds useful behavior beyond annotations: return format (base64 bytes plus content type), exactness of the attachment, and the scoping requirement for IDs. It does not mention rate limits or auth, but those are not necessary given the annotation coverage.

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

Conciseness2/5

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

The first sentence is front-loaded and clear, and the chain is useful. But the Chat ID / Message ID / Attachment ID blocks are near-verbatim copies of the schema property descriptions, and the 'Never pass' lists are repeated, making the description longer than needed.

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 retrieval tool with no output schema, the description covers the return format, prerequisites, required IDs, and common invalid inputs. The only gaps are minor: account_id is left to the schema and the message_id guidance includes an irrelevant mutation-tool caveat. Overall, an agent has enough to call the tool correctly.

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 coverage is 100%, so the baseline is 3; the description adds the required-chain and scoping rationale plus 'Never pass' warnings. However, the per-parameter text largely duplicates the schema descriptions verbatim, and the message_id section contains a confusing 'for mutation tools' artifact that is irrelevant to this read-only tool. The optional account_id is only described in the schema, not in the main description.

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 first sentence names a specific verb ('Download'), a precise resource ('one exact attachment'), the supported channels (WhatsApp, Instagram, Telegram, LinkedIn), and the output form (base64 bytes with content type). It also establishes the ID-scoping constraint, which distinguishes it from generic message/email retrieval tools.

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 gives an explicit required chain ('resolve/list chat -> chat_id -> get/list message -> attachment.id -> retrieve') and states all three IDs are required because attachment identity is scoped to its message. It provides per-ID 'Obtain with' and 'Never pass' guidance, though it does not name sibling alternatives such as email_get_attachment for explicit exclusion.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.