Skip to main content
Glama

discord_read_dms

Read-only

Fetch recent direct messages between the bot and a specified Discord user, oldest to newest, without sending anything. Review DM history with message content, authors, embeds, and timestamps.

Instructions

Read the most recent messages from the bot's DM conversation with a user, oldest-to-newest. Returns { messages: [...] } with id, author, content, embed count, timestamp. Read-only, except that Discord opens an empty DM channel when none exists yet; nothing is sent. For a server channel or thread, use discord_read_messages. With DISCORD_ALLOWED_GUILDS set, the user must be a member of a listed server.

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": {
      "user_id": "<user_id>"
    },
    "name": "discord_read_dms"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoHow many recent messages to fetch (1–100). Default 20.
user_idYesDiscord user ID (snowflake) of the DM recipient.

Output Schema

NameRequiredDescriptionDefault
messagesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.3.0
    • 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",
      -  "embeds",
      -  "timestamp"
      -]New value: +[
      +  "id",
      +  "author",
      +  "author_id",
      +  "content",
      +  "embeds",
      +  "timestamp"
      +]
  2. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed6 schema fields changedv2.0.0
    • 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"
    • addedInput schema / properties / user_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"
      +          },
      +          "embeds": {
      +            "type": "number"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "timestamp": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "author",
      +          "content",
      +          "embeds",
      +          "timestamp"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "required": [
      +    "messages"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changedv1.6.0
    • changedInput schema / properties / limit / description
      Previous value: -"1–100, default 20."New value: +"How many recent messages to fetch (1–100). Default 20."
    • changedInput schema / properties / user_id / description
      Previous value: -"The Discord user ID."New value: +"Discord user ID (snowflake) of the DM recipient."
  5. Addedv1.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond readOnlyHint/openWorldHint by disclosing that Discord opens an empty DM channel when none exists yet, while explicitly reassuring that nothing is sent — a non-obvious side effect that would otherwise look like a write. It also names the return shape and the guild-membership authorization constraint.

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?

Three tight sentences: purpose and return shape first, the read-only caveat second, the alternative and precondition last. No filler, and the most decision-relevant routing information is present without burying the main action.

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 two-parameter read tool with annotations and an output schema, this covers everything an agent needs: scope, ordering, return shape, side-effect caveat, alternative tool, and access precondition. Nothing material is left to inference.

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 both parameters are fully described there, so the schema carries the load. The description adds only ordering semantics (oldest-to-newest) and nothing about limit behavior or user_id format, so baseline 3 is correct.

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 the most recent messages from the bot's DM conversation with a user') plus ordering (oldest-to-newest), which immediately separates it from the channel-reading sibling. An agent knows exactly what this does without opening the 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?

Explicitly routes the agent elsewhere: 'For a server channel or thread, use discord_read_messages.' It also states a precondition — with DISCORD_ALLOWED_GUILDS set, the user must be a member of a listed server — covering when the call will fail or be inappropriate.

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