Skip to main content
Glama

discord_edit_message

Idempotent

Edits the text of a bot-authored Discord message in a channel or thread, replacing its content while keeping existing embeds. Use it to update or correct messages the bot previously sent.

Instructions

Edit the text content of a message previously sent by this bot. Discord forbids editing other users' messages, so this fails for non-bot messages. It changes the text and keeps any embeds; discord_edit_embed replaces the embeds and keeps the text. Works in text channels and threads. Requires the View Channel and Read Message History permissions. Returns the edited message ID. Use discord_edit_dm for a DM, or discord_edit_webhook_message for a message sent through a webhook.

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>",
      "message_id": "<message_id>",
      "content": "<content>"
    },
    "name": "discord_edit_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesNew plain-text content that fully replaces the existing content (max 2000 characters).
channel_idYesID (snowflake) of the channel or thread containing the message.
message_idYesID of the message to edit. Must be a message authored by this bot.

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 / channel_id / pattern
      Added value: +"^\\d{17,20}$"
    • addedInput schema / properties / message_id / pattern
      Added value: +"^\\d{17,20}$"
  4. Changed3 schema fields changedv1.6.0
    • addedInput schema / properties / channel_id / description
      Added value: +"ID (snowflake) of the channel or thread containing the message."
    • changedInput schema / properties / content / description
      Previous value: -"New text content for the message."New value: +"New plain-text content that fully replaces the existing content (max 2000 characters)."
    • changedInput schema / properties / message_id / description
      Previous value: -"The message ID to edit (must be a bot message)."New value: +"ID of the message to edit. Must be a message authored by this bot."
  5. Addedv1.5.0
  6. Removedv1.0.0
  7. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare idempotent, non-destructive, non-read-only behavior, so the bar is lower, but the description still adds material context: the bot-authorship restriction, that embeds are preserved rather than replaced, and the required View Channel and Read Message History permissions. It also notes the return value (edited message ID) despite no output schema being present.

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?

Purpose is front-loaded followed by constraints, alternatives, and the return value in a logical order. Every sentence carries information, though the trailing alternative-routing sentence is slightly dense and could be trimmed for length without losing much.

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 tool with no output schema, the definition covers what is changed, what is preserved, failure conditions, permissions, scope of channels, return value, and the sibling alternatives. There is no meaningful gap an agent would need filled before calling it correctly.

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 all three parameters carry inline descriptions, including the 2000-character limit and the snowflake patterns, so the schema does the heavy lifting. The description reinforces that content fully replaces existing text and that message_id must be bot-authored, but adds little syntax or format meaning beyond that baseline.

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 first sentence gives a specific verb (Edit), a precisely scoped resource (text content of a message), and a constraint on authorship (previously sent by this bot). It then explicitly contrasts with discord_edit_embed (embeds vs text), which is the closest-looking sibling, so an agent can distinguish them without opening either 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?

It states when this tool applies (text channels and threads), when it fails (non-bot messages, since Discord forbids editing other users' messages), and names three concrete alternatives with the condition that selects each: discord_edit_embed for embeds, discord_edit_dm for DMs, discord_edit_webhook_message for webhook messages. Nothing is left to inference.

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