Skip to main content
Glama

discord_edit_dm

Idempotent

Edit the text content of a bot-sent direct message in Discord. Provide the recipient user ID, message ID, and new plain-text content to fully replace the existing message.

Instructions

Edit the text content of a DM message previously sent by this bot. Only the bot's own DM messages can be edited. Use discord_edit_dm_embed for embed messages. Returns a confirmation.

Input Schema

TableJSON 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.2.0
    • addedInput schema / additionalProperties
      Added value: +false
  2. 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}$"
  3. 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."
  4. Addedv1.1.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false, destructiveHint=false, and idempotentHint=true, so the description only needs to add context. It adds meaningful behavioral constraints: only the bot's own DM messages can be edited, and it returns a confirmation. No contradiction with annotations exists.

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 concise sentences with no filler. The main action is front-loaded, followed by the ownership constraint, an alternative-tool pointer, and a return-value note. 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 simple edit operation with fully documented parameters and annotations covering safety/idempotency, the description covers the essential context: what it edits, who can edit it, when to use a different tool, and what the return is. No important calling context is missing.

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%, so the schema already documents all three parameters, including content constraints and the max 2000-character limit. The description adds little beyond saying 'text content' and 'confirmation,' which is sufficient but not a significant enrichment.

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 action ('Edit the text content of a DM message'), identifies the resource (DM message previously sent by this bot), and scopes the tool clearly. It also explicitly distinguishes itself from discord_edit_dm_embed for embed 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?

The description gives a clear when-to-use condition ('DM message previously sent by this bot') and a when-not-to-use condition ('Only the bot's own DM messages can be edited'). It also names the alternative for embed messages: 'Use discord_edit_dm_embed for embed messages.'

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