discord-mcp

Fetch pinned messages

discord_fetch_pinned_messages

Read-only

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

List a channel's pinned messages, most recently pinned first. Returns { messages: [...], hasMore, nextBefore } with id, author, content, timestamp, pinnedAt, and the text of any embeds. Discord serves at most 50 pins per call, so when hasMore is true pass nextBefore back as `before` to fetch the next page. Requires the View Channel and Read Message History permissions; without Read Message History an empty result fails with an error naming the permission. Use discord_pin_message to change which messages are pinned, or discord_read_messages to read the whole channel.

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 to list pins from.
limitoptionalinteger
1 to 50default 50
Max pins per page (1–50). Default 50.
beforeoptionalstring
format date-time
pattern (288 characters)^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$
Pagination cursor: an ISO timestamp compared against when a message was pinned, not when it was sent. Pass the previous response's nextBefore to fetch older pins.

Output

Declared by outputSchema: clients receive this shape as structuredContent.

FieldTypeDescription
guild_idrequiredstring or null
messagesrequiredarray of objects
id (nested, level 1)requiredstring
author (nested, level 1)requiredstring
author_id (nested, level 1)requiredstring
webhook_id (nested, level 1)string
content (nested, level 1)requiredstring
timestamp (nested, level 1)requiredstring
embeds (nested, level 1)array of objects
title (nested, level 2)string
author (nested, level 2)string
description (nested, level 2)string
url (nested, level 2)string
fields (nested, level 2)array of objects
name (nested, level 3)requiredstring
value (nested, level 3)requiredstring
moreFields (nested, level 2)numberCount of fields left out past the first 10. Absent when none were.
footer (nested, level 2)string
pinnedAt (nested, level 1)requiredstring
hasMorerequiredboolean
nextBeforerequiredstring or null

Related tools

Named in its description

Also in Messages

Raw definition (2,748 bytes)
{
  "name": "discord_fetch_pinned_messages",
  "description": "List a channel's pinned messages, most recently pinned first. Returns { messages: [...], hasMore, nextBefore } with id, author, content, timestamp, pinnedAt, and the text of any embeds. Discord serves at most 50 pins per call, so when hasMore is true pass nextBefore back as `before` to fetch the next page. Requires the View Channel and Read Message History permissions; without Read Message History an empty result fails with an error naming the permission. Use discord_pin_message to change which messages are pinned, or discord_read_messages to read the whole channel.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "channel_id": {
        "type": "string",
        "pattern": "^\\d{17,20}$",
        "description": "ID (snowflake) of the channel or thread to list pins from."
      },
      "limit": {
        "default": 50,
        "description": "Max pins per page (1–50). Default 50.",
        "type": "integer",
        "minimum": 1,
        "maximum": 50
      },
      "before": {
        "description": "Pagination cursor: an ISO timestamp compared against when a message was pinned, not when it was sent. Pass the previous response's nextBefore to fetch older pins.",
        "type": "string",
        "format": "date-time",
        "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
      }
    },
    "required": [
      "channel_id"
    ],
    "additionalProperties": false
  },
  "outputSchema": {
    "type": "object",
    "properties": {
      "guild_id": {
        "type": [
          "string",
          "null"
        ]
      },
      "messages": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "id": {
              "type": "string"
            },
            "author": {
              "type": "string"
            },
            "author_id": {
              "type": "string"
            },
            "webhook_id": {
              "type": "string"
            },
            "content": {
              "type": "string"
            },
            "timestamp": {
              "type": "string"
            },
            "embeds": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "title": {
                    "type": "string"
                  },
                  "author": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  },
                  "url": {
                    "type": "string"
                  },
                  "fields": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "value": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name",
                        "value"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "moreFields": {
                    "description": "Count of fields left out past the first 10. Absent when none were.",
                    "type": "number"
                  },
                  "footer": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            },
            "pinnedAt": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "author",
            "author_id",
            "content",
            "timestamp",
            "pinnedAt"
          ],
          "additionalProperties": false
        }
      },
      "hasMore": {
        "type": "boolean"
      },
      "nextBefore": {
        "type": [
          "string",
          "null"
        ]
      }
    },
    "required": [
      "guild_id",
      "messages",
      "hasMore",
      "nextBefore"
    ],
    "additionalProperties": false
  },
  "annotations": {
    "title": "Fetch pinned messages",
    "readOnlyHint": true,
    "openWorldHint": true
  }
}