Skip to main content
Glama
Guildora
by az-xx

Open message attachments

get_attachment
Read-onlyIdempotent

Retrieve a Discord message's attachments to view images, read text files such as logs or JSON, and list other files with size and URL; choose one attachment or fetch all available images.

Instructions

Opens a message's attachments so you can see them: images (screenshots, photos) come back as images, scaled down to a readable size; text files (logs, code, JSON, CSV) come back as text. Other files are listed with their size and URL. Pick one with "attachment" (ID or file name), or get all (up to 4 images).

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": "<message>"
    },
    "name": "get_attachment"
  }
}

Input Schema

NameRequiredDescriptionDefault
userNoInstead of channel: a user (ID, <@mention> or name) whose DM channel to use.
guildNoServer ID or name. Optional if DISCORD_GUILD_ID is set or the bot is in one server.
channelNoChannel or thread: ID, <#mention>, link, or name. Archived threads by ID or link.
messageYesMessage ID or message link (https://discord.com/channels/...). With a link, channel is optional.
max_charsNoMax characters per text file (default 20000).
attachmentNoAttachment ID or file name. Default: all attachments.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, openWorld), so the description earns credit for the extra layer: content-dependent return shapes, downscaled images, and a hard cap of 4 images when fetching everything. What it does not cover is what happens when there are more than 4 images, or whether files that exceed max_chars are flagged as truncated.

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 sentences, front-loaded with the core action, then return behavior, then parameter choice. Dense but every clause carries information an agent needs to pick arguments correctly.

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 read-only tool with no output schema, explaining the three return shapes is exactly the right use of description space. Remaining gaps are edge-case handling: behavior past the 4-image cap, truncation signaling, and oversized-file fallback.

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 every parameter is already documented, and the description mostly reflects that back ('attachment' as ID or file name, default all). The one bit of added meaning is the 'up to 4 images' behavior of the default all-attachments path, which the schema does not convey.

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?

States a specific verb and resource ('Opens a message's attachments') and immediately breaks down what comes back by content type: images as scaled images, text files as text, other files as size+URL. No sibling tool in the list handles attachments, so there is no ambiguity to resolve.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied rather than spelled out: the agent learns it must supply a message (ID or link) and may narrow to one attachment or take everything. There is no explicit guidance on when to reach for get_attachment versus get_message, and no stated prerequisites such as guild/channel resolution failing.

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