Skip to main content
Glama

discord_read_messages

Read-only

Fetch messages from a Discord channel or thread in chronological order, with pagination to go beyond the 100-message cap. Returns message content, author, and timestamp.

Instructions

Read messages from a text channel or thread, oldest-to-newest. Page backwards by re-calling with before set to the id of the oldest message you received, which walks a channel past the 100-message per-call cap. Requires the View Channel and Read Message History permissions. Returns { messages: [...] } with id, author, content, timestamp, attachment count, pinned flag. Use discord_search_messages to filter by keyword, or discord_fetch_pinned_messages for pinned messages only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
afterNoReturn only messages newer than this message ID (snowflake). Page forwards by passing the id of the newest message from the previous call.
limitNoHow many messages to fetch per call (1–100). Default 20.
sinceNoReturn only messages posted after this instant, as an ISO 8601 date or a date-time with an explicit offset (e.g. "2026-08-01" or "2026-08-01T09:00:00Z"). Convenience form of `after`: the call yields the oldest `limit` messages after that instant, so page forwards with `after` set to the newest id received.
aroundNoReturn messages centered on this message ID (snowflake): Discord splits `limit` either side of it, and an even `limit` puts the extra message on the newer side. Use it to read outward from a known message, such as a discord_search_guild_messages hit.
beforeNoReturn only messages older than this message ID (snowflake). Page backwards through history by passing the id of the oldest message from the previous call.
channel_idYesID (snowflake) of the channel or thread to read from.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
messagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
    • addedInput schema / properties / after
      Added value: +{
      +  "description": "Return only messages newer than this message ID (snowflake). Page forwards by passing the id of the newest message from the previous call.",
      +  "pattern": "^\\d{17,20}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / around
      Added value: +{
      +  "description": "Return messages centered on this message ID (snowflake): Discord splits `limit` either side of it, and an even `limit` puts the extra message on the newer side. Use it to read outward from a known message, such as a discord_search_guild_messages hit.",
      +  "pattern": "^\\d{17,20}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / before
      Added value: +{
      +  "description": "Return only messages older than this message ID (snowflake). Page backwards through history by passing the id of the oldest message from the previous call.",
      +  "pattern": "^\\d{17,20}$",
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / description
      Previous value: -"How many recent messages to fetch (1–100). Default 20."New value: +"How many messages to fetch per call (1–100). Default 20."
    • addedInput schema / properties / since
      Added value: +{
      +  "anyOf": [
      +    {
      +      "format": "date",
      +      "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])))$",
      +      "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)))$",
      +      "type": "string"
      +    }
      +  ],
      +  "description": "Return only messages posted after this instant, as an ISO 8601 date or a date-time with an explicit offset (e.g. \"2026-08-01\" or \"2026-08-01T09:00:00Z\"). Convenience form of `after`: the call yields the oldest `limit` messages after that instant, so page forwards with `after` set to the newest id received."
      +}
  2. Changed6 schema fields changedv2.0.0
    • addedInput schema / properties / channel_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / limit / default
      Added value: +20
    • addedInput schema / properties / limit / maximum
      Added value: +100
    • addedInput schema / properties / limit / minimum
      Added value: +1
    • changedInput schema / properties / limit / type
      Previous value: -"number"New value: +"integer"
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "messages": {
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "attachments": {
      +            "type": "number"
      +          },
      +          "author": {
      +            "type": "string"
      +          },
      +          "content": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "pinned": {
      +            "type": "boolean"
      +          },
      +          "timestamp": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "author",
      +          "content",
      +          "timestamp",
      +          "attachments",
      +          "pinned"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "messages"
      +  ],
      +  "type": "object"
      +}
  3. Changed2 schema fields changedv1.6.0
    • addedInput schema / properties / channel_id / description
      Added value: +"ID (snowflake) of the channel or thread to read from."
    • changedInput schema / properties / limit / description
      Previous value: -"1–100, default 20."New value: +"How many recent messages to fetch (1–100). Default 20."
  4. Addedv1.5.0
  5. Removedv1.0.0
  6. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations provide readOnlyHint=true and openWorldHint=true, so the safety profile is already established. The description adds substantial behavioral context beyond that: required permissions (View Channel, Read Message History), the 100-message per-call cap, pagination mechanics, oldest-to-newest ordering, and the exact return shape. No contradiction with annotations.

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?

Four sentences with no wasted words: purpose and ordering, pagination mechanics, permission requirements, return shape, and sibling routing. Front-loaded with the core purpose and every sentence earns its place.

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?

For a read tool with 6 parameters, pagination complexity, and permission requirements, the description covers everything an agent needs: scope, ordering, paging strategy, the per-call cap, auth prerequisites, return shape summary, and when to use sibling tools. An output schema exists, so full return-value documentation is not required.

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% and each parameter already has rich descriptions (before/after/around/limit/since all explain their semantics). The description adds value by connecting the limit maximum to the 100-message cap and explaining the paging-walk strategy using before. This exceeds the baseline 3 but doesn't need to do much more given the schema's thoroughness.

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?

The description states a specific verb and resource ('Read messages from a text channel or thread') along with the ordering behavior ('oldest-to-newest'). It names the sibling alternatives explicitly (discord_search_messages, discord_fetch_pinned_messages), making the tool easy to distinguish without opening schemas.

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?

Provides explicit routing guidance: 'Use discord_search_messages to filter by keyword, or discord_fetch_pinned_messages for pinned messages only.' Also gives a concrete usage pattern for pagination ('Page backwards by re-calling with before set to the id of the oldest message you received'), including how to work past the 100-message per-call cap.

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