Skip to main content
Glama

discord_read_messages

Read-only

Read messages from a Discord channel or thread, oldest to newest, and page backward past the 100-message limit by passing the oldest received message ID as the before cursor.

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; without Read Message History an empty result fails with an error naming the permission. Returns { messages: [...] } with id, author, content, timestamp, attachment count, pinned flag, and the text of any embeds. Use discord_search_messages or discord_search_guild_messages to filter by keyword, or discord_fetch_pinned_messages for pinned messages only.

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_read_messages"
  }
}

Input 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

NameRequiredDescriptionDefault
guild_idYes
messagesYes

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",
      -  "attachments",
      -  "pinned"
      -]New value: +[
      +  "id",
      +  "author",
      +  "author_id",
      +  "content",
      +  "timestamp",
      +  "attachments",
      +  "pinned"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "messages"
      -]New value: +[
      +  "guild_id",
      +  "messages"
      +]
  2. Changed2 schema fields changedv2.2.1
    • changedInput schema / properties / since / anyOf
      Previous value: -[
      -  {
      -    "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"
      -  }
      -]New value: +[
      +  {
      +    "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"
      +  }
      +]
    • 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"
      +}
  3. 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."
      +}
  4. 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"
      +}
  5. 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."
  6. Addedv1.5.0
  7. Removedv1.0.0
  8. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint/openWorldHint annotations by naming the required permissions (View Channel, Read Message History), describing the failure mode when history permission is missing (empty result plus an error naming the permission), and disclosing the 100-message cap. It also sketches the returned fields, so the agent knows what it gets without opening the output schema.

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?

Front-loads purpose and ordering, then paging, then permissions and error behavior, then return shape, then alternatives — a sensible priority order for an agent deciding whether to call. Each sentence carries distinct information with no filler or restatement of the title.

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?

Covers the three things an agent needs for a paginated read: what it returns, how to page past the cap, and what auth failures look like. With an output schema present, the brief return-field summary is sufficient rather than redundant.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema's before/after/around descriptions already spell out the paging semantics, so the description's paging instruction largely restates structured data. The only added meaning is the linkage between the before parameter and the 100-message cap, and limit/since/around are not discussed at all in prose.

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?

States a specific verb and resource ("Read messages from a text channel or thread") plus the ordering guarantee (oldest-to-newest), which an agent cannot infer from the name alone. The closing sentence explicitly separates it from discord_search_messages, discord_search_guild_messages, and discord_fetch_pinned_messages.

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?

Gives concrete when-to-use routing: this tool for unfiltered channel history, the two search tools for keyword filtering, and discord_fetch_pinned_messages for pinned-only reads. It also explains the paging workflow (re-call with before set to the oldest id received) and states the 100-message per-call ceiling that motivates it.

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