discord-mcp

Get message attachments

discord_get_message_attachments

Read-only

Toolset
Messages messages
Discord permissions
View Channel and Read Message History
Context cost
519 tokens, estimated2,074 bytes of definition, divided by 4

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.

Risk and annotations

Read-onlyreadOnlyHintyesDoes not modify your server.
DestructivedestructiveHintn/aNot declared: it only applies to tools that write.
IdempotentidempotentHintn/aNot declared.
Open worldopenWorldHintyesInteracts with an external system: Discord.

Annotations are hints the server declares. Clients use them to decide when to ask you before a call.

Parameters

ParameterTypeRulesDescription
channel_idrequiredstring
pattern ^\d{17,20}$
ID (snowflake) of the channel or thread containing the message.
message_idrequiredstring
pattern ^\d{17,20}$
ID of the message whose attachments to list.

Output

Declared by outputSchema: clients receive this shape as structuredContent.

FieldType
attachmentsrequiredarray of objects
id (nested, level 1)requiredstring
filename (nested, level 1)requiredstring
contentType (nested, level 1)requiredstring or null
size (nested, level 1)requirednumber
url (nested, level 1)requiredstring
proxyUrl (nested, level 1)requiredstring
width (nested, level 1)requirednumber or null
height (nested, level 1)requirednumber or null
description (nested, level 1)requiredstring or null
title (nested, level 1)requiredstring or null
duration (nested, level 1)requirednumber or null
waveform (nested, level 1)requiredstring or null
spoiler (nested, level 1)requiredboolean

Related tools

Named in its description

Also in Messages

Raw definition (2,074 bytes)
{
  "name": "discord_get_message_attachments",
  "description": "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.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "channel_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "ID (snowflake) of the channel or thread containing the message."
      },
      "message_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "ID of the message whose attachments to list."
      }
    },
    "required": [
      "channel_id",
      "message_id"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "properties": {
      "attachments": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "filename": {
              "type": "string"
            },
            "contentType": {
              "type": [
                "string",
                "null"
              ]
            },
            "size": {
              "type": "number"
            },
            "url": {
              "type": "string"
            },
            "proxyUrl": {
              "type": "string"
            },
            "width": {
              "type": [
                "number",
                "null"
              ]
            },
            "height": {
              "type": [
                "number",
                "null"
              ]
            },
            "description": {
              "type": [
                "string",
                "null"
              ]
            },
            "title": {
              "type": [
                "string",
                "null"
              ]
            },
            "duration": {
              "type": [
                "number",
                "null"
              ]
            },
            "waveform": {
              "type": [
                "string",
                "null"
              ]
            },
            "spoiler": {
              "type": "boolean"
            }
          },
          "required": [
            "id",
            "filename",
            "contentType",
            "size",
            "url",
            "proxyUrl",
            "width",
            "height",
            "description",
            "title",
            "duration",
            "waveform",
            "spoiler"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "attachments"
    ],
    "additionalProperties": false
  },
  "annotations": {
    "title": "Get message attachments",
    "readOnlyHint": true,
    "openWorldHint": true
  }
}