Skip to main content
Glama

discord_get_message_attachments

Read-only

List a Discord message's file attachments with filename, URL, content type, size, dimensions, and spoiler flag. Use it to retrieve images, voice messages, or files from a channel or thread.

Instructions

List the file attachments of a message. Returns { attachments: [...] } with id, filename, title (the original name when Discord strips non-ASCII from filename), url, proxyUrl, contentType, size in bytes, width, height, alt-text description, voice-message duration and waveform, spoiler flag. Discord signs CDN urls with a 24-hour expiry and does not re-sign on every fetch; re-call this tool if a stored url has expired. Requires the View Channel and Read Message History permissions. Without the Message Content privileged intent, enabled in the Developer Portal, Discord returns no attachments for other users' messages unless they mention the bot. A forwarded message's files sit in its snapshot and are not listed. Read-only. Use discord_read_messages to find messages with attachments.

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": {
      "channel_id": "<channel_id>",
      "message_id": "<message_id>"
    },
    "name": "discord_get_message_attachments"
  }
}

Input Schema

NameRequiredDescriptionDefault
channel_idYesID (snowflake) of the channel or thread containing the message.
message_idYesID of the message whose attachments to list.

Output Schema

NameRequiredDescriptionDefault
attachmentsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv2.2.1
    • removedOutput schema / properties / attachments / items / properties / contentType / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / contentType / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / attachments / items / properties / description / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / description / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / attachments / items / properties / duration / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / duration / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / attachments / items / properties / height / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / height / type
      Added value: +[
      +  "number",
      +  "null"
      +]
    • removedOutput schema / properties / attachments / items / properties / title / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / title / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / attachments / items / properties / waveform / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / waveform / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • removedOutput schema / properties / attachments / items / properties / width / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / attachments / items / properties / width / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. Addedv2.2.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well past the readOnlyHint/openWorldHint annotations: it discloses the required View Channel and Read Message History permissions, the Message Content privileged intent dependency, the 24-hour CDN URL signing and re-call advice, and the forwarded-message snapshot exception. These are exactly the failure modes an agent needs before calling.

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?

Purpose is front-loaded in the first sentence and every subsequent sentence carries a distinct operational constraint (expiry, permissions, intent, snapshot, read-only) with no filler. The field enumeration is long but serves as a one-glance return-value summary.

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?

Covers permissions, privileged-intent prerequisites, URL expiry, and the forwarded-message exception, which is more than enough for a two-parameter read tool with a full output schema. An agent has everything needed to call it correctly and to interpret an empty result.

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 description coverage is 100% and both parameters are documented with snowflake patterns in the schema itself; the description adds no syntax or constraint meaning beyond what is already structured. Baseline 3 applies.

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?

Opens with a specific verb+resource ('List the file attachments of a message') that is unmistakably distinct from siblings like discord_read_messages or discord_get_reactions. It also names the sibling to use for discovery, so an agent can separate the two without opening either schema.

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?

Explicitly routes discovery to discord_read_messages, and states two concrete conditions under which this tool is the right or wrong call (forwarded messages' files live in the snapshot; missing Message Content intent yields nothing for other users). No explicit statement of when to avoid the tool wholesale, which keeps it short of a 5.

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

Deploy Server

Other Tools