Skip to main content
Glama

discord_fetch_pinned_messages

Read-only

List a Discord channel's pinned messages, newest pins first, and paginate to retrieve additional pinned messages beyond the 50-per-call limit.

Instructions

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.

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

Input Schema

NameRequiredDescriptionDefault
limitNoMax pins per page (1–50). Default 50.
beforeNoPagination 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.
channel_idYesID (snowflake) of the channel or thread to list pins from.

Output Schema

NameRequiredDescriptionDefault
hasMoreYes
guild_idYes
messagesYes
nextBeforeYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.3.0
    • addedOutput schema / properties / guild_id
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / messages / items / properties / author_id
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / messages / items / properties / webhook_id
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / messages / items / required
      Previous value: -[
      -  "id",
      -  "author",
      -  "content",
      -  "timestamp",
      -  "pinnedAt"
      -]New value: +[
      +  "id",
      +  "author",
      +  "author_id",
      +  "content",
      +  "timestamp",
      +  "pinnedAt"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "messages",
      -  "hasMore",
      -  "nextBefore"
      -]New value: +[
      +  "guild_id",
      +  "messages",
      +  "hasMore",
      +  "nextBefore"
      +]
  2. Changed6 schema fields changedv2.2.1
    • addedInput schema / properties / before
      Added value: +{
      +  "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.",
      +  "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)))$",
      +  "type": "string"
      +}
    • addedInput schema / properties / limit
      Added value: +{
      +  "default": 50,
      +  "description": "Max pins per page (1–50). Default 50.",
      +  "maximum": 50,
      +  "minimum": 1,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / hasMore
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / messages / items / properties / embeds
      Added value: +{
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "author": {
      +        "type": "string"
      +      },
      +      "description": {
      +        "type": "string"
      +      },
      +      "fields": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "name": {
      +              "type": "string"
      +            },
      +            "value": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "name",
      +            "value"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "footer": {
      +        "type": "string"
      +      },
      +      "moreFields": {
      +        "description": "Count of fields left out past the first 10. Absent when none were.",
      +        "type": "number"
      +      },
      +      "title": {
      +        "type": "string"
      +      },
      +      "url": {
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / nextBefore
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "messages"
      -]New value: +[
      +  "messages",
      +  "hasMore",
      +  "nextBefore"
      +]
  3. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  4. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / channel_id / pattern
      Added value: +"^\\d{17,20}$"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "messages": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "author": {
      +            "type": "string"
      +          },
      +          "content": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "pinnedAt": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "author",
      +          "content",
      +          "timestamp",
      +          "pinnedAt"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "messages"
      +  ],
      +  "type": "object"
      +}
  5. Changed1 schema field changedv1.6.0
    • addedInput schema / properties / channel_id / description
      Added value: +"ID (snowflake) of the channel or thread to list pins from."
  6. Addedv1.5.0

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is covered structurally. The description adds genuinely useful behavior beyond that: the 50-pin server cap, the hasMore/nextBefore continuation flow, and the specific failure mode where a missing permission yields an empty result with an error naming the permission. However, it doesn't cover rate limiting or what happens when a pinned message was deleted.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well front-loaded: purpose, then return shape, then pagination mechanics, then permissions, then alternatives. Every sentence carries information, though the permission sentence is dense enough that a clause about the error naming the permission could be trimmed without loss.

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?

An output schema exists, so return values need not be spelled out, yet the description still names the envelope fields and pagination flags. Combined with permissions, paging mechanics, and sibling routing, there is nothing an agent needs to call this correctly that is missing.

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 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema can't: it explains that nextBefore from a prior response goes back in as `before`, which is the actual usage pattern. It also reinforces that the cursor compares against pinnedAt rather than message send time.

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 and resource plus an ordering guarantee: 'List a channel's pinned messages, most recently pinned first.' It is unmistakably different from discord_read_messages (whole channel) and discord_pin_message (mutation), so an agent can select it without opening a schema.

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?

Names both alternatives and the condition that selects each: discord_pin_message 'to change which messages are pinned' and discord_read_messages 'to read the whole channel.' It also states the precondition (View Channel + Read Message History) that determines whether the call will succeed.

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