Skip to main content
Glama

discord_edit_embed

Edit Discord bot embed messages by updating specific fields like title, description, color, or images while removing omitted elements.

Instructions

Edit an embed message previously sent by the bot. Only provided fields are updated; omitted fields are removed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
message_idYesThe message ID to edit (must be a bot message with an embed).
titleNo
urlNoURL that makes the title clickable.
descriptionNo
colorNoHex color e.g. #5865F2
fieldsNo
authorNo
thumbnail_urlNo
footerNo
image_urlNo
timestampNoIf true, adds the current timestamp to the embed.

Implementation Reference

  • The handler logic for 'discord_edit_embed' which fetches the message, validates the sender, updates the embed, and edits the message.
    case "discord_edit_embed": {
      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 embeds sent by the bot.");
      const embed = buildEmbed(args);
      await msg.edit({ embeds: [embed] });
      return { content: [{ type: "text", text: `✅ Embed edited on message ${args.message_id} in #${channel.name}.` }] };
    }
  • The schema definition for the 'discord_edit_embed' tool, outlining required parameters and input properties.
    {
      name: "discord_edit_embed",
      description: "Edit an embed message previously sent by the bot. Only provided fields are updated; omitted fields are removed.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          message_id: { type: "string", description: "The message ID to edit (must be a bot message with an embed)." },
          title: { type: "string" },
          url: { type: "string", description: "URL that makes the title clickable." },
          description: { type: "string" },
          color: { type: "string", description: "Hex color e.g. #5865F2" },
          fields: {
            type: "array",
            items: {
              type: "object",
              properties: {
                name: { type: "string" },
                value: { type: "string" },
                inline: { type: "boolean" },
              },
              required: ["name", "value"],
            },
          },
          author: {
            type: "object",
            properties: {
              name: { type: "string" },
              icon_url: { type: "string" },
              url: { type: "string" },
            },
            required: ["name"],
          },
          thumbnail_url: { type: "string" },
          footer: { type: "string" },
          image_url: { type: "string" },
          timestamp: { type: "boolean", description: "If true, adds the current timestamp to the embed." },
        },
        required: ["channel_id", "message_id"],
      },
    },

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