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"]
      }
    },
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Edits an existing webhook,' which implies a mutation operation, but doesn't describe what happens during editing (e.g., partial updates, validation, permissions required), error conditions, or response format. For a 6-parameter mutation tool with zero annotation coverage, this leaves critical behavioral traits unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core action ('Edits an existing webhook'). There is no wasted verbiage or redundancy, making it highly concise and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, mutation operation, no output schema, and 0% schema coverage), the description is incomplete. It lacks details on parameter meanings, behavioral traits (e.g., permissions, error handling), and usage context. Without annotations or output schema, the description should provide more comprehensive guidance to compensate, which it does not.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate for all 6 undocumented parameters. It mentions 'webhook' and 'Discord channel,' hinting at webhookId and channelId, but doesn't explain any parameters (e.g., what name, avatar, reason represent, or that webhookToken might be optional). The description adds minimal value beyond the schema's property names, failing to address the coverage gap adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Edits') and resource ('an existing webhook for a Discord channel'), making the purpose immediately understandable. It distinguishes this from sibling tools like discord_create_webhook (creation) and discord_delete_webhook (deletion), though it doesn't explicitly mention these distinctions. The description is specific but could be more precise about what aspects can be edited.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing webhook), exclusions, or compare it to related tools like discord_create_webhook or discord_delete_webhook. The agent must infer usage from the name and context alone, which is insufficient for optimal tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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