Skip to main content
Glama
Discord MCP - Discord server management MCP for AI agents

Discord MCP - Discord server management MCP for AI agents

Edit message

edit_message

Updates text, embeds, or Components V2 layouts in bot-sent or webhook messages, preserving component-only layouts. Use it to correct or revise Discord messages within allowed edit permissions.

Instructions

Edit a message the bot itself sent, or one posted through one of the server's webhooks (that needs Manage Webhooks). Discord does not allow editing anyone else's messages, no matter the permission level. A message sent as a Components V2 layout stays one: edit it with components, never with content or embeds.

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": "<channel>",
      "message_id": "<message_id>"
    },
    "name": "edit_message"
  }
}

Input Schema

NameRequiredDescriptionDefault
guildNoGuild (server) name or ID. Omit to use the default guild.
embedsNoUp to 10 embeds. Each needs a title, a description, an author, fields, a footer, or a picture. Discord allows 6,000 characters of text across all of one message's embeds.
channelYesChannel name or ID.
contentNoThe new text, replacing the message's current text.
componentsNoRich layout, in place of content and embeds. Sending this sets the Components V2 flag, which is permanent for that message: it can never show plain content or embeds afterward, so the two cannot be combined.
message_idYesMessage ID, or the message's link.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.2.2
    • addedInput schema / properties / content / description
      Added value: +"The new text, replacing the message's current text."
  2. Changed15 schema fields changedv1.4.2
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / components / items / properties / components / items / properties / media / items / properties / url / description
      Previous value: -"Public image URL."New value: +"Public image URL, or attachment://<filename> for a file sent with the message."
    • changedInput schema / properties / components / items / properties / media / items / properties / url / description
      Previous value: -"Public image URL."New value: +"Public image URL, or attachment://<filename> for a file sent with the message."
    • changedInput schema / properties / embeds / description
      Previous value: -"Up to 10 embeds."New value: +"Up to 10 embeds. Each needs a title, a description, an author, fields, a footer, or a picture. Discord allows 6,000 characters of text across all of one message's embeds."
    • addedInput schema / properties / embeds / items / additionalProperties
      Added value: +false
    • addedInput schema / properties / embeds / items / properties / author
      Added value: +{
      +  "description": "Small line above the title, such as who it is from.",
      +  "maxLength": 256,
      +  "type": "string"
      +}
    • addedInput schema / properties / embeds / items / properties / fields
      Added value: +{
      +  "description": "Up to 25 name and value pairs under the description.",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "inline": {
      +        "description": "Sits beside its neighbours instead of on a row of its own.",
      +        "type": "boolean"
      +      },
      +      "name": {
      +        "maxLength": 256,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "value": {
      +        "maxLength": 1024,
      +        "minLength": 1,
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "name",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 25,
      +  "type": "array"
      +}
    • addedInput schema / properties / embeds / items / properties / footer
      Added value: +{
      +  "description": "Small line at the bottom.",
      +  "maxLength": 2048,
      +  "type": "string"
      +}
    • addedInput schema / properties / embeds / items / properties / image_url
      Added value: +{
      +  "description": "Large picture under the text: an http or https link, or attachment://<filename> for a file that comes with the message.",
      +  "maxLength": 2048,
      +  "pattern": "^(https?|attachment):\\/\\/\\S+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / embeds / items / properties / thumbnail_url
      Added value: +{
      +  "description": "Small picture in the top corner, given the same way.",
      +  "maxLength": 2048,
      +  "pattern": "^(https?|attachment):\\/\\/\\S+$",
      +  "type": "string"
      +}
    • addedInput schema / properties / embeds / items / properties / timestamp
      Added value: +{
      +  "description": "A time shown beside the footer: \"now\" for the current time, or ISO 8601, like 2026-11-09T18:00:00Z. With no zone it is read as UTC.",
      +  "type": "string"
      +}
    • addedInput schema / properties / embeds / items / properties / url / description
      Added value: +"Makes the title a link."
    • removedInput schema / properties / embeds / items / properties / url / format
      Removed value: -"uri"
    • addedInput schema / properties / embeds / items / properties / url / pattern
      Added value: +"^https?:\\/\\/"
    • addedInput schema / properties / message_id / description
      Added value: +"Message ID, or the message's link."
  3. Changed1 schema field changedv1.4.0
    • addedInput schema / properties / components
      Added value: +{
      +  "description": "Rich layout, in place of content and embeds. Sending this sets the Components V2 flag, which is permanent for that message: it can never show plain content or embeds afterward, so the two cannot be combined.",
      +  "items": {
      +    "properties": {
      +      "accent_color": {
      +        "description": "For container, hex color of the left edge, like #5865f2.",
      +        "type": "string"
      +      },
      +      "buttons": {
      +        "description": "For buttons, 1-5 link buttons on one row. For section, exactly one. Link buttons only: this server does not answer interactions, so a button that fires one would fail for whoever clicked it.",
      +        "items": {
      +          "properties": {
      +            "disabled": {
      +              "type": "boolean"
      +            },
      +            "label": {
      +              "description": "Button text.",
      +              "maxLength": 80,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "url": {
      +              "description": "Where the button leads.",
      +              "format": "uri",
      +              "maxLength": 512,
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "label",
      +            "url"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 5,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "components": {
      +        "description": "For container, the 1-10 blocks inside it.",
      +        "items": {
      +          "properties": {
      +            "buttons": {
      +              "items": {
      +                "properties": {
      +                  "disabled": {
      +                    "type": "boolean"
      +                  },
      +                  "label": {
      +                    "description": "Button text.",
      +                    "maxLength": 80,
      +                    "minLength": 1,
      +                    "type": "string"
      +                  },
      +                  "url": {
      +                    "description": "Where the button leads.",
      +                    "format": "uri",
      +                    "maxLength": 512,
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "label",
      +                  "url"
      +                ],
      +                "type": "object"
      +              },
      +              "maxItems": 5,
      +              "minItems": 1,
      +              "type": "array"
      +            },
      +            "divider": {
      +              "type": "boolean"
      +            },
      +            "media": {
      +              "items": {
      +                "properties": {
      +                  "description": {
      +                    "description": "Alt text.",
      +                    "maxLength": 1024,
      +                    "type": "string"
      +                  },
      +                  "spoiler": {
      +                    "description": "Blur until clicked.",
      +                    "type": "boolean"
      +                  },
      +                  "url": {
      +                    "description": "Public image URL.",
      +                    "format": "uri",
      +                    "type": "string"
      +                  }
      +                },
      +                "required": [
      +                  "url"
      +                ],
      +                "type": "object"
      +              },
      +              "maxItems": 10,
      +              "minItems": 1,
      +              "type": "array"
      +            },
      +            "spacing": {
      +              "enum": [
      +                "small",
      +                "large"
      +              ],
      +              "type": "string"
      +            },
      +            "text": {
      +              "maxLength": 4000,
      +              "minLength": 1,
      +              "type": "string"
      +            },
      +            "type": {
      +              "description": "Same block types as above, except container.",
      +              "enum": [
      +                "text",
      +                "section",
      +                "gallery",
      +                "separator",
      +                "buttons"
      +              ],
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "type"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "divider": {
      +        "description": "For separator, draw a horizontal rule. Default true.",
      +        "type": "boolean"
      +      },
      +      "media": {
      +        "description": "For gallery, 1-10 images. For section, exactly one, shown as a thumbnail on the right.",
      +        "items": {
      +          "properties": {
      +            "description": {
      +              "description": "Alt text.",
      +              "maxLength": 1024,
      +              "type": "string"
      +            },
      +            "spoiler": {
      +              "description": "Blur until clicked.",
      +              "type": "boolean"
      +            },
      +            "url": {
      +              "description": "Public image URL.",
      +              "format": "uri",
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "url"
      +          ],
      +          "type": "object"
      +        },
      +        "maxItems": 10,
      +        "minItems": 1,
      +        "type": "array"
      +      },
      +      "spacing": {
      +        "description": "For separator, how much padding. Default small.",
      +        "enum": [
      +          "small",
      +          "large"
      +        ],
      +        "type": "string"
      +      },
      +      "spoiler": {
      +        "description": "For container, blur the whole group until clicked.",
      +        "type": "boolean"
      +      },
      +      "text": {
      +        "description": "Markdown body. Required for text and section.",
      +        "maxLength": 4000,
      +        "minLength": 1,
      +        "type": "string"
      +      },
      +      "type": {
      +        "description": "text: a paragraph of markdown. section: text with a thumbnail or link button beside it. gallery: 1-10 images. separator: vertical space, optionally a rule. buttons: a row of link buttons. container: a bordered group with a colored edge.",
      +        "enum": [
      +          "text",
      +          "section",
      +          "gallery",
      +          "separator",
      +          "buttons",
      +          "container"
      +        ],
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type"
      +    ],
      +    "type": "object"
      +  },
      +  "maxItems": 40,
      +  "minItems": 1,
      +  "type": "array"
      +}
  4. Changed2 schema fields changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / embeds / items / additionalProperties
      Removed value: -false
  5. First observedv1.0.2

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only say readOnlyHint=false and destructiveHint=false; the description adds real behavioral context on top: the ownership restriction, the Manage Webhooks requirement for webhook messages, and the permanent Components V2 constraint. It does not explain whether fields omitted from the call are preserved or cleared, which is the main remaining gap for a mutation tool.

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 sentences, each carrying distinct information: who owns the message, what permission webhook edits need, and the Components V2 rule. The most restrictive constraint is front-loaded, and there is no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter mutation tool with no output schema, it covers ownership, permissions, and the Components V2 edge case well. It leaves the merge semantics of unspecified fields unstated, which an agent would want to know before editing only part of a message.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds meaning at the parameter level: a Components V2 message must be edited with components and never with content or embeds. That constrains how the components, content, and embeds parameters interact with the message's existing state, which the schema states only as a general incompatibility.

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 names a specific verb and resource (edit a message) and immediately narrows the scope to messages the bot itself sent or webhook-posted messages. That scope statement is what separates this from delete_message, send_message, and other message siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear when-to-use condition and an explicit when-not: Discord will not allow editing anyone else's messages regardless of permission, and webhook edits require Manage Webhooks. It stops short of naming an alternative path (e.g., delete and resend) for messages that cannot be edited, so it is strong but not complete.

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