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
| Name | Required | Description | Default |
|---|---|---|---|
| channel_id | Yes | ||
| title | No | ||
| url | No | URL that makes the title clickable. | |
| description | No | ||
| color | No | Hex color e.g. #5865F2 | |
| fields | No | ||
| author | No | Author block shown at the top of the embed. | |
| thumbnail_url | No | Small image shown in the top-right corner. | |
| footer | No | ||
| image_url | No | ||
| timestamp | No | If true, adds the current timestamp to the embed. |
Implementation Reference
- src/tools/messages.ts:365-370 (handler)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}.` }] }; } - src/tools/messages.ts:97-136 (schema)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"], }, }, - src/tools/messages.ts:270-289 (helper)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; }