Skip to main content
Glama

discord_create_webhook

Create a webhook in a Discord channel to automate message delivery and integrate external services.

Instructions

Create a webhook on a channel.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
nameYesName for the webhook.
avatarNoOptional avatar URL for the webhook.

Implementation Reference

  • The handler logic for 'discord_create_webhook' which fetches the channel, checks for webhook support, and creates the webhook.
    case "discord_create_webhook": {
      const channel = await discord.channels.fetch(validateId(args.channel_id, "channel_id"));
      if (!channel || !("createWebhook" in channel)) throw new Error("Channel does not support webhooks.");
      const webhook = await (channel as any).createWebhook({
        name: args.name as string,
        avatar: (args.avatar as string | undefined) ?? undefined,
      });
      return {
        content: [{
          type: "text",
          text: `✅ Webhook "${webhook.name}" created (id: ${webhook.id}, token: ${webhook.token}).`,
        }],
      };
    }
  • The MCP schema definition for the 'discord_create_webhook' tool.
    {
      name: "discord_create_webhook",
      description: "Create a webhook on a channel.",
      inputSchema: {
        type: "object",
        properties: {
          channel_id: { type: "string" },
          name: { type: "string", description: "Name for the webhook." },
          avatar: { type: "string", description: "Optional avatar URL for the webhook." },
        },
        required: ["channel_id", "name"],
      },
    },

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