UNPKG

mcp-discord-agent-comm

Version:

An MCP server enabling async communication between AI agents and users via Discord - perfect for long-running tasks requiring remote interaction

34 lines (33 loc) 819 B
import { z } from "zod"; import { getChannel } from "../utils.js"; export function sendNotificationTool(server, discord, defaultChannelId) { server.tool( "discord_send_notification", "Send a notification message to a Discord channel", { message: z.string().describe("The message to send"), channel_id: z .string() .optional() .describe( "Discord channel ID (optional, uses default if not provided)", ), }, async ({ message, channel_id }) => { const channel = await getChannel(discord, channel_id, defaultChannelId); await channel.send(message); return { content: [ { type: "text", text: JSON.stringify({ success: true, message: "Notification sent", }), }, ], }; }, ); } //# sourceMappingURL=send-notification.js.map