Skip to main content
Glama
jar285

MCP-Discord

by jar285

discord_delete_webhook

Delete Discord webhooks to remove automated message sources from channels, manage integrations, and maintain channel organization.

Instructions

Deletes an existing webhook for a Discord channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhookIdYes
webhookTokenNo
reasonNo

Implementation Reference

  • Handler function for discord_delete_webhook tool. Parses arguments, fetches the webhook using Discord client, deletes it, and returns success or error response.
    case "discord_delete_webhook": {
      const { webhookId, webhookToken, reason } = DeleteWebhookSchema.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
          };
        }
    
        // Delete the webhook
        await webhook.delete(reason || "Webhook deleted via API");
    
        return {
          content: [{ 
            type: "text", 
            text: `Successfully deleted webhook with ID: ${webhook.id}` 
          }]
        };
      } catch (error) {
        return {
          content: [{ type: "text", text: `Failed to delete webhook: ${error}` }],
          isError: true
        };
      }
    }
  • Zod schema for input validation of discord_delete_webhook tool parameters: webhookId (required), webhookToken (optional), reason (optional).
    const DeleteWebhookSchema = z.object({
        webhookId: z.string(),
        webhookToken: z.string().optional(),
        reason: z.string().optional()
    });
  • src/index.ts:445-457 (registration)
    Tool registration in the list of available tools, including name, description, and input schema definition.
    {
      name: "discord_delete_webhook",
      description: "Deletes an existing webhook for a Discord channel",
      inputSchema: {
        type: "object",
        properties: {
          webhookId: { type: "string" },
          webhookToken: { type: "string" },
          reason: { type: "string" }
        },
        required: ["webhookId"]
      }
    }

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.9/5.0
Behavior2/5

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

The description does not disclose any behavioral traits such as irreversibility, required permissions, or side effects. With no annotations provided, the description carries the full burden but fails to warn that deletion is permanent or that a webhook token may be required.

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 concise sentence with no superfluous words. It efficiently states the core action without waste, making it appropriately sized.

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?

The tool is destructive, has three parameters, zero schema descriptions, and no output schema or annotations. The description omits parameter purposes, irreversibility, authentication requirements, and any usage context, making it inadequate for a complete understanding.

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

Parameters1/5

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

Schema description coverage is 0%, and the description adds no information about the parameters. It does not explain the purpose or format of webhookToken or reason, nor does it clarify which identifier is required. The description does not compensate for the missing schema descriptions.

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

Purpose5/5

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

The description clearly states the tool's specific action: 'Deletes an existing webhook for a Discord channel.' It uses the verb 'deletes' with a specific resource, distinguishing it from siblings like discord_create_webhook and discord_edit_webhook.

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 like discord_edit_webhook or discord_send_webhook_message. It only states the action without any context or exclusions, leaving the agent without direction.

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