Skip to main content
Glama

get_attachment

Read-only

Open a file attached to a message (images are returned so you can see them). Pass message_id from read_conversation or search_messages and the attachment index (default 0). Messages whose text is only "[image: …]" carry their content in the attachment — open it before answering.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "message_id": "<message_id>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexNoAttachment index from the message's attachments list (default 0)
message_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

The annotations only declare readOnlyHint=true, so the description carries the burden of behavior and does add real value: it states that image content is returned inline for viewing and that attachment-only messages hide their content behind a placeholder. It does not describe what is returned for non-image files or how unreadable/missing attachments behave, which leaves a gap for a fetch tool with no output schema.

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?

Three short sentences, front-loaded with the action and return behavior, followed by the parameter source and the proactive trigger condition. No filler or redundant phrasing.

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?

With no output schema, the description must explain returns and it does so for images plus the '[image: …]' placeholder case. It stops short of covering non-image attachments and failure conditions, a minor but real gap for a two-parameter fetch tool.

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 only 50%, and message_id has no schema description at all; the description compensates by specifying exactly which sibling tools produce a valid message_id. It also restates the index default of 0, which adds nothing beyond the schema but does not detract.

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 opens with a specific verb and resource ('Open a file attached to a message') and immediately clarifies the return behavior ('images are returned so you can see them'). No sibling tool in the list fetches attachments, so the scope is unambiguous.

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?

It names the upstream tools that supply the argument ('Pass message_id from read_conversation or search_messages') and gives a concrete mandatory trigger: messages whose text is only '[image: …]' must have their attachment opened before answering. That is explicit when-to-use guidance rather than inference.

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.

Resources