Fetch pinned messages
discord_
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_ to change which messages are pinned, or discord_ to read the whole channel.
Risk and annotations
Read-onlyreadOnlyHint | yes | Does not modify your server. |
|---|---|---|
DestructivedestructiveHint | n/a | Not declared: it only applies to tools that write. |
IdempotentidempotentHint | n/a | Not declared. |
Open worldopenWorldHint | yes | Interacts with an external system: Discord. |
Annotations are hints the server declares. Clients use them to decide when to ask you before a call.
Parameters
| Parameter | Type | Rules | Description |
|---|---|---|---|
| channel_ | string | pattern ^\d{17,20}$ | ID (snowflake) of the channel or thread to list pins from. |
| limitoptional | integer | 1 to 50default 50 | Max pins per page (1–50). Default 50. |
| beforeoptional | string | format date-timepattern (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.
| Field | Type | Description |
|---|---|---|
| guild_ | string or null | |
| messagesrequired | array of objects | |
| id (nested, level 1)required | string | |
| author (nested, level 1)required | string | |
| author_ | string | |
| webhook_ | string | |
| content (nested, level 1)required | string | |
| timestamp (nested, level 1)required | string | |
| 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)required | string | |
| value (nested, level 3)required | string | |
| moreFields (nested, level 2) | number | Count of fields left out past the first 10. Absent when none were. |
| footer (nested, level 2) | string | |
| pinnedAt (nested, level 1)required | string | |
| hasMorerequired | boolean | |
| nextBeforerequired | string or null |
Related tools
Named in its description
Also in Messages
-
Send message, Write
discord_send_ message -
Reply to message, Write
discord_reply_ message -
Edit message, Write
discord_edit_ message -
Add reaction, Write
discord_add_ reaction -
List channel threads, Read-only
discord_list_ channel_ threads -
Create thread, Write
discord_create_ thread -
Bulk delete messages, Destructive
discord_bulk_ delete_ messages -
Send embed, Write
discord_send_ embed -
Edit embed, Write
discord_edit_ embed -
Send multiple embeds, Write
discord_send_ multiple_ embeds -
Delete message, Destructive
discord_delete_ message -
Search messages, Read-only
discord_search_ messages -
Search guild messages, Read-only
discord_search_ guild_ messages -
Crosspost message, Write
discord_crosspost_ message -
Remove reactions, Destructive
discord_remove_ reactions -
Get reactions, Read-only
discord_get_ reactions -
Get message attachments, Read-only
discord_get_ message_ attachments -
Forward message, Write
discord_forward_ message
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
}
}