Skip to main content
Glama

discord_delete_webhook

Delete a webhook from a Discord channel by providing its ID and token. Optionally include a reason for the deletion.

Instructions

Deletes an existing webhook for a Discord channel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
webhookIdYes
webhookTokenNo
reasonNo

Implementation Reference

  • Main handler function that deletes a Discord webhook by fetching it via webhookId/webhookToken and calling webhook.delete().
    export async function deleteWebhookHandler(
      args: unknown,
      context: ToolContext
    ): Promise<ToolResponse> {
      const { webhookId, webhookToken, reason } = DeleteWebhookSchema.parse(args);
      try {
        if (!context.client.isReady()) {
          return {
            content: [{ type: 'text', text: 'Discord client not logged in.' }],
            isError: true,
          };
        }
    
        const webhook = await context.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 handleDiscordError(error);
      }
    }
Behavior2/5

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

No annotations are present, and the description does not disclose behavioral traits such as irreversibility of deletion, required permissions, or side effects on existing messages.

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

Conciseness4/5

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

A single sentence with no excess, but could be more informative without losing conciseness.

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

Completeness3/5

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

Given the simplicity of a delete operation and the presence of sibling tools for webhook management, the description is adequate but lacks connection to related tools or context on webhook tokens.

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%, and the description adds no meaning beyond the parameter names. It does not explain the role of webhookToken or reason.

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 verb (deletes) and resource (webhook for a Discord channel), and it distinguishes from sibling tools 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?

No guidance is provided on when to use this tool vs alternatives, nor are any prerequisites or conditions mentioned.

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

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