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

Edit messages your Discord bot or server webhook posted; other users' messages cannot be changed, and Components V2 layouts must keep using components.

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.
contentNo
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. 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."
  2. 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"
      +}
  3. Changed2 schema fields changedv1.3.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • removedInput schema / properties / embeds / items / additionalProperties
      Removed value: -false
  4. 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 tell the agent this is a non-read-only, non-destructive mutation. The description adds real behavioral context beyond that: the elevated permission needed for webhooks, the hard platform restriction on editing others' messages, and the fact that the Components V2 flag is permanent. It does not say whether edits are reversible or how unmentioned fields are treated, which keeps it at 4.

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 a distinct constraint, front-loaded with the eligibility rule before the permission and layout caveats. No filler or repetition of the title.

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 mutation tool with a deeply nested components schema and no output schema or documentation of return values, the description covers the critical layout and permission traps. It omits partial-update semantics (whether omitted content/embeds are cleared) and failure behavior, which leaves a small but real gap.

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 83%, so the baseline is 3, but the description adds a cross-parameter constraint the schema only implies: a Components V2 message must be edited with components and never with content or embeds. That is genuine semantic value for choosing between the content, embeds, and components parameters.

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 opens with a specific verb and resource ("Edit a message") and immediately scopes it to messages the bot sent or webhook messages, so an agent can distinguish this from send_message or delete_message without reading 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 Guidelines4/5

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

It gives explicit eligibility rules (own messages, webhook messages requiring Manage Webhooks) and an explicit exclusion ("Discord does not allow editing anyone else's messages, no matter the permission level"). It stops short of naming sibling alternatives such as delete+resend for cases where an edit is impossible, so it is not a full 5.

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