Skip to main content
Glama

discord_send_embed

Send rich embed messages to Discord channels with customizable titles, descriptions, colors, images, and structured fields for clear information display.

Instructions

Send a rich embed message with title, description, color, fields, footer, image, thumbnail, author, URL, and timestamp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
titleNo
urlNoURL that makes the title clickable.
descriptionNo
colorNoHex color e.g. #5865F2
fieldsNo
authorNoAuthor block shown at the top of the embed.
thumbnail_urlNoSmall image shown in the top-right corner.
footerNo
image_urlNo
timestampNoIf true, adds the current timestamp to the embed.

Implementation Reference

  • The handler implementation for the discord_send_embed tool.
    case "discord_send_embed": {
      const channel = await getTextChannel(args.channel_id as string);
      const embed = buildEmbed(args);
      const sent = await channel.send({ embeds: [embed] });
      return { content: [{ type: "text", text: `✅ Embed sent (id: ${sent.id}) in #${channel.name}.` }] };
    }
  • The input schema for the discord_send_embed tool.
      name: "discord_send_embed",
      description: "Send a rich embed message with title, description, color, fields, footer, image, thumbnail, author, URL, and timestamp.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          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",
            description: "Author block shown at the top of the embed.",
            properties: {
              name: { type: "string" },
              icon_url: { type: "string" },
              url: { type: "string" },
            },
            required: ["name"],
          },
          thumbnail_url: { type: "string", description: "Small image shown in the top-right corner." },
          footer: { type: "string" },
          image_url: { type: "string" },
          timestamp: { type: "boolean", description: "If true, adds the current timestamp to the embed." },
        },
        required: ["channel_id"],
      },
    },
  • Helper function used by discord_send_embed to construct the embed object.
    function buildEmbed(args: Record<string, unknown>): EmbedBuilder {
      const embed = new EmbedBuilder();
      if (args.title) embed.setTitle(args.title as string);
      if (args.url) embed.setURL(args.url as string);
      if (args.description) embed.setDescription(args.description as string);
      if (args.color) embed.setColor(args.color as ColorResolvable);
      if (args.footer) embed.setFooter({ text: args.footer as string });
      if (args.image_url) embed.setImage(args.image_url as string);
      if (args.thumbnail_url) embed.setThumbnail(args.thumbnail_url as string);
      if (args.timestamp) embed.setTimestamp();
      if (args.author) {
        const a = args.author as { name: string; icon_url?: string; url?: string };
        embed.setAuthor({ name: a.name, iconURL: a.icon_url, url: a.url });
      }
      if (args.fields) {
        const fields = args.fields as { name: string; value: string; inline?: boolean }[];
        embed.addFields(fields.map((f) => ({ name: f.name, value: f.value, inline: f.inline ?? false })));
      }
      return embed;
    }

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