Skip to main content
Glama

discord_edit_dm

Idempotent

Edit the text content of a direct message previously sent by the bot, replacing the body while preserving any embed. Use it to correct or update bot-sent DMs without changing their embeds.

Instructions

Edit the text content of a DM message previously sent by this bot. Only the bot's own DM messages can be edited. It changes the text and keeps any embed; discord_edit_dm_embed replaces the embed. Returns a confirmation. For a message in a server channel, use discord_edit_message. 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>",
      "message_id": "<message_id>",
      "content": "<content>"
    },
    "name": "discord_edit_dm"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesNew plain-text content that fully replaces the existing message (max 2000 characters).
user_idYesDiscord user ID (snowflake) of the DM recipient.
message_idYesID of the target message within the DM conversation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.5.0
    • addedInput schema / properties / content / maxLength
      Added value: +2000
  2. Changed1 schema field changedv2.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  3. Changed2 schema fields changedv2.0.0
    • addedInput schema / properties / message_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / user_id / pattern
      Added value: +"^\\d{17,20}$"
  4. Changed3 schema fields changedv1.6.0
    • changedInput schema / properties / content / description
      Previous value: -"New text content for the message."New value: +"New plain-text content that fully replaces the existing message (max 2000 characters)."
    • changedInput schema / properties / message_id / description
      Previous value: -"The message ID (must be a bot message)."New value: +"ID of the target message within the DM conversation."
    • changedInput schema / properties / user_id / description
      Previous value: -"The Discord user ID."New value: +"Discord user ID (snowflake) of the DM recipient."
  5. Addedv1.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (idempotent, non-destructive, open-world), it discloses the ownership constraint that only the bot's own DM messages can be edited, that the existing embed is preserved, and that a confirmation is returned. It stops short of rate-limit behavior or error modes, but the mutation's key side effect (text replaced wholesale, embed untouched) is clear.

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?

Four compact sentences, each carrying distinct information: scope, ownership limit, embed-preservation behavior plus alternative, and guild gate. Front-loaded with the core action; no filler, though the sentences could be consolidated slightly for faster scanning.

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 three-parameter mutation with no output schema, it covers everything an agent needs: what is edited, who may edit, what survives (the embed), what is returned (a confirmation), and which sibling to pick otherwise. No output schema exists, so the description is not obliged to detail return values beyond the confirmation note.

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 description coverage is 100% and all three parameters are documented inline, so the description only needs to not conflict — it doesn't. The 'fully replaces the existing message' phrasing echoes the schema's own wording rather than adding new meaning about user_id or message_id resolution.

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?

Names a specific verb and resource ('Edit the text content of a DM message') and immediately narrows scope to 'previously sent by this bot'. The explicit contrasts with discord_edit_dm_embed (embeds) and discord_edit_message (server channels) let an agent separate it from its closest siblings without opening any 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?

Gives concrete routing rules: use discord_edit_dm_embed to replace the embed, use discord_edit_message for server-channel messages, and the DISCORD_ALLOWED_GUILDS membership requirement that gates eligibility. Both the when-to-use and the when-to-use-something-else cases are stated outright.

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