Skip to main content
Glama
scarecr0w12

discord-mcp

delete_event

Remove scheduled Discord events from your server by providing the guild ID and event ID to cancel planned activities.

Instructions

Delete a scheduled event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)
eventIdYesThe ID of the event to delete

Implementation Reference

  • The handler function that performs the actual deletion of the Discord scheduled event using the Discord client. It fetches the guild and event, deletes the event, and handles errors with withErrorHandling.
    async ({ guildId, eventId }) => {
      const result = await withErrorHandling(async () => {
        const client = await getDiscordClient();
        const guild = await client.guilds.fetch(guildId);
        const event = await guild.scheduledEvents.fetch(eventId);
        const eventName = event.name;
    
        await event.delete();
    
        return { eventId, eventName, message: 'Event deleted successfully' };
      });
    
      if (!result.success) {
        return { content: [{ type: 'text', text: result.error }], isError: true };
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
    }
  • Zod schema defining the input parameters: guildId and eventId for the delete_event tool.
    {
      guildId: z.string().describe('The ID of the server (guild)'),
      eventId: z.string().describe('The ID of the event to delete'),
    },
  • The server.tool call that registers the 'delete_event' tool with name, description, schema, and handler function.
    server.tool(
      'delete_event',
      'Delete a scheduled event',
      {
        guildId: z.string().describe('The ID of the server (guild)'),
        eventId: z.string().describe('The ID of the event to delete'),
      },
      async ({ guildId, eventId }) => {
        const result = await withErrorHandling(async () => {
          const client = await getDiscordClient();
          const guild = await client.guilds.fetch(guildId);
          const event = await guild.scheduledEvents.fetch(eventId);
          const eventName = event.name;
    
          await event.delete();
    
          return { eventId, eventName, message: 'Event deleted successfully' };
        });
    
        if (!result.success) {
          return { content: [{ type: 'text', text: result.error }], isError: true };
        }
    
        return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
      }
    );
  • src/index.ts:63-63 (registration)
    Top-level registration call that invokes registerEventTools to set up all event tools including delete_event.
    registerEventTools(server);
  • src/index.ts:20-20 (registration)
    Import of the registerEventTools function from event-tools.ts.
    import { registerEventTools } from './tools/event-tools.js';
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Delete' implies a destructive, irreversible action, the description doesn't specify whether this requires specific permissions, what confirmation (if any) is needed, whether deletion is permanent or recoverable, or what happens to event subscribers. For a destructive tool with zero annotation coverage, this represents a significant gap in safety and operational context.

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 communicates the core function without unnecessary words. It's appropriately sized for a simple destructive operation and front-loads the essential information. Every word earns its place, making it easy for an agent to parse quickly.

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?

For a destructive tool with no annotations and no output schema, the description is insufficiently complete. It doesn't address critical context like permission requirements, irreversible nature, error conditions, or what happens post-deletion. With siblings offering modification and information retrieval alternatives, the description should provide more guidance on when deletion is appropriate versus other operations.

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

Parameters3/5

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

Schema description coverage is 100%, with both parameters (guildId and eventId) clearly documented in the schema. The description adds no additional parameter information beyond what the schema already provides - it doesn't explain where to find these IDs, format requirements, or validation rules. With complete schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance parameter understanding.

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 'Delete a scheduled event' clearly states the verb (delete) and resource (scheduled event), making the purpose immediately understandable. It distinguishes from siblings like 'delete_channel' or 'delete_message' by specifying the resource type. However, it doesn't explicitly differentiate from similar destructive operations like 'delete_automod_rule' or 'delete_webhook' beyond the resource name.

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. There's no mention of prerequisites (e.g., needing admin permissions), when deletion is appropriate versus modification, or what happens to associated data. With siblings like 'modify_event' and 'get_event_info' available, the lack of comparative context leaves the agent guessing about selection criteria.

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

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