Skip to main content
Glama
discord-mcp

discord-mcp

components_v2_edit

Edits a previously sent Components V2 Discord message after previewing the payload and confirming approval, preserving the irreversible V2 format.

Instructions

Purpose: Edit a Components V2 message previously sent by this bot. The IS_COMPONENTS_V2 flag is irreversible - V2 messages stay V2.

Returns: {message_id, channel_id, edited_timestamp}. The server first returns a bounded component review with payload_hash and one-time approval_id; run with MCP_DRY_RUN=false, __confirm:true, the exact __confirm_hash, and __confirm_id before expiry to edit once.

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>",
      "components": "<components>"
    },
    "name": "components_v2_edit"
  }
}

Input Schema

NameRequiredDescriptionDefault
__confirmNoAuthorize the exact payload supplied in this call after reviewing its summary.
channel_idYesDiscord channel ID (snowflake)
componentsYes
message_idYesDiscord message ID
__confirm_idNoOne-time approval ID returned by the preceding preview; expires shortly.
__confirm_hashNoSHA-256 payload_hash returned by the preceding preview.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.26.0
    • addedInput schema / properties / __confirm
      Added value: +{
      +  "description": "Authorize the exact payload supplied in this call after reviewing its summary.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / __confirm_hash
      Added value: +{
      +  "description": "SHA-256 payload_hash returned by the preceding preview.",
      +  "pattern": "^[a-f0-9]{64}$",
      +  "type": "string"
      +}
    • addedInput schema / properties / __confirm_id
      Added value: +{
      +  "description": "One-time approval ID returned by the preceding preview; expires shortly.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  2. First observedv0.22.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, and the description adds genuinely new behavioral facts: the IS_COMPONENTS_V2 flag is irreversible so the message stays V2 forever, and edits are gated behind a one-time approval that expires. It also documents the side-channel tokens (__confirm_hash/__confirm_id) and that the approval permits exactly one edit.

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?

Front-loaded with an explicit 'Purpose:' label and a 'Returns:' line, so the essential facts are immediately visible. Dense but nearly every clause carries information; the Returns line is slightly redundant given an output schema exists.

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 6-parameter mutation with an output schema and strong annotations, the definition covers the irreversible-flag caveat, the two-phase confirmation, and expiry. The remaining gaps are what the components payload should look like and whether supplying components replaces all existing components, which an agent must guess.

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 83%, so the schema already explains channel_id, message_id, __confirm, __confirm_id and __confirm_hash; the description largely restates those. The description adds no meaning for the components array, whose items are untyped and which is the single hardest parameter to fill correctly (structure, limits of 1-40, relationship to the build_* siblings).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Edit a Components V2 message') plus a meaningful scope restriction ('previously sent by this bot'). It implicitly separates itself from messages_edit and webhooks_edit_message by limiting to Components V2, but never names those alternatives, so the differentiation is inferred rather than stated.

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?

Gives concrete procedural guidance: the server returns a review with payload_hash and approval_id, then you must re-run with MCP_DRY_RUN=false, __confirm:true, the exact __confirm_hash and __confirm_id before expiry. What is missing is when to choose this over messages_edit/webhooks_edit_message or components_v2_preview, and whether partial or full replacement of components is expected.

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