Skip to main content
Glama
jar285

MCP-Discord

by jar285

discord_edit_webhook

Modify an existing Discord webhook's name, avatar, or channel by providing its ID and token. This tool enables updating webhook configurations for automated messaging workflows.

Instructions

Edits an existing webhook for a Discord channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhookIdYes
webhookTokenNo
nameNo
avatarNo
channelIdNo
reasonNo

Implementation Reference

  • The handler for discord_edit_webhook tool. Parses arguments using EditWebhookSchema, fetches the webhook using client.fetchWebhook, and calls webhook.edit with the provided options.
    case "discord_edit_webhook": { const { webhookId, webhookToken, name, avatar, channelId, reason } = EditWebhookSchema.parse(args); try { if (!client.isReady()) { return { content: [{ type: "text", text: "Discord client not logged in. Please use discord_login tool first." }], isError: true }; } const webhook = await client.fetchWebhook(webhookId, webhookToken); if (!webhook) { return { content: [{ type: "text", text: `Cannot find webhook with ID: ${webhookId}` }], isError: true }; } // Edit the webhook await webhook.edit({ name: name, avatar: avatar, channel: channelId, reason: reason }); return { content: [{ type: "text", text: `Successfully edited webhook with ID: ${webhook.id}` }] }; } catch (error) { return { content: [{ type: "text", text: `Failed to edit webhook: ${error}` }], isError: true }; } }
  • Zod input schema definition for the discord_edit_webhook tool parameters.
    const EditWebhookSchema = z.object({ webhookId: z.string(), webhookToken: z.string().optional(), name: z.string().optional(), avatar: z.string().optional(), channelId: z.string().optional(), reason: z.string().optional() });
  • src/index.ts:429-444 (registration)
    Registration of the discord_edit_webhook tool in the list of available tools returned by ListToolsRequestHandler, including the input schema.
    { name: "discord_edit_webhook", description: "Edits an existing webhook for a Discord channel", inputSchema: { type: "object", properties: { webhookId: { type: "string" }, webhookToken: { type: "string" }, name: { type: "string" }, avatar: { type: "string" }, channelId: { type: "string" }, reason: { type: "string" } }, required: ["webhookId"] } },

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/jar285/mcp-discord'

If you have feedback or need assistance with the MCP directory API, please join our Discord server