Skip to main content
Glama

discord_edit_message

Edit bot messages in Discord channels by providing channel ID, message ID, and new content to update text.

Instructions

Edit a message sent by the bot.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYesThe message ID to edit (must be a bot message).
contentYesNew text content for the message.

Implementation Reference

  • The handler function that executes the `discord_edit_message` logic.
    case "discord_edit_message": {
      const channel = await getTextChannel(args.channel_id as string);
      const msg = await channel.messages.fetch(args.message_id as string);
      if (msg.author.id !== discord.user?.id) throw new Error("Can only edit messages sent by the bot.");
      const edited = await msg.edit(args.content as string);
      return { content: [{ type: "text", text: `✅ Message ${edited.id} edited in #${channel.name}.` }] };
    }
  • The input schema definition for `discord_edit_message`.
    {
      name: "discord_edit_message",
      description: "Edit a message sent by the bot.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          message_id: { type: "string", description: "The message ID to edit (must be a bot message)." },
          content: { type: "string", description: "New text content for the message." },
        },
        required: ["channel_id", "message_id", "content"],
      },
    },
Behavior2/5

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

With no annotations, the description carries full burden but provides minimal behavioral insight. It states the tool edits messages but doesn't cover permissions needed, rate limits, whether edits are logged, or what happens on failure. This leaves significant gaps 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?

The description is a single, front-loaded sentence with zero wasted words. It directly states the tool's purpose without unnecessary elaboration, making it highly efficient.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is inadequate. It lacks details on permissions, error conditions, response format, or side effects, leaving the agent with insufficient context to use it safely and effectively.

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 67% (2 of 3 parameters have descriptions), providing a baseline. The description adds no additional parameter semantics beyond what's in the schema, such as format constraints or examples for channel_id or content.

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?

The description clearly states the action ('Edit') and resource ('a message sent by the bot'), making the purpose immediately understandable. It doesn't explicitly differentiate from siblings like discord_edit_embed or discord_reply_message, but the specificity about bot messages provides some distinction.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like discord_edit_embed (for embeds) or discord_reply_message (for new messages). The description mentions 'must be a bot message' in the schema, but this isn't integrated into usage context or prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/PaSympa/discord-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server