Skip to main content
Glama
scarecr0w12

discord-mcp

modify_event

Update scheduled Discord events by changing name, description, time, location, or status to keep server activities current.

Instructions

Modify a scheduled event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
guildIdYesThe ID of the server (guild)
eventIdYesThe ID of the event
nameNoNew name
descriptionNoNew description
scheduledStartTimeNoNew start time (ISO 8601)
scheduledEndTimeNoNew end time (ISO 8601)
statusNoNew status
locationNoNew location
reasonNoReason for modifying

Implementation Reference

  • The core handler function implementing the modify_event tool. It fetches the Discord guild and event, constructs edit data from provided parameters, calls event.edit(), handles errors with withErrorHandling, and returns the result.
    async ({ guildId, eventId, name, description, scheduledStartTime, scheduledEndTime, status, location, reason }) => {
      const result = await withErrorHandling(async () => {
        const client = await getDiscordClient();
        const guild = await client.guilds.fetch(guildId);
        const event = await guild.scheduledEvents.fetch(eventId);
    
        const statusMap: Record<string, GuildScheduledEventStatus> = {
          'SCHEDULED': GuildScheduledEventStatus.Scheduled,
          'ACTIVE': GuildScheduledEventStatus.Active,
          'COMPLETED': GuildScheduledEventStatus.Completed,
          'CANCELED': GuildScheduledEventStatus.Canceled,
        };
    
        const editData: Record<string, unknown> = {};
        if (name) editData.name = name;
        if (description) editData.description = description;
        if (scheduledStartTime) editData.scheduledStartTime = scheduledStartTime;
        if (scheduledEndTime) editData.scheduledEndTime = scheduledEndTime;
        if (status) editData.status = statusMap[status];
        if (location) editData.entityMetadata = { location };
        if (reason) editData.reason = reason;
    
        const updated = await event.edit(editData);
    
        return {
          id: updated.id,
          name: updated.name,
          status: GuildScheduledEventStatus[updated.status],
          message: 'Event updated successfully',
        };
      });
    
      if (!result.success) {
        return { content: [{ type: 'text', text: result.error }], isError: true };
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
    }
  • Input schema using Zod for validating parameters to the modify_event tool.
    {
      guildId: z.string().describe('The ID of the server (guild)'),
      eventId: z.string().describe('The ID of the event'),
      name: z.string().optional().describe('New name'),
      description: z.string().optional().describe('New description'),
      scheduledStartTime: z.string().optional().describe('New start time (ISO 8601)'),
      scheduledEndTime: z.string().optional().describe('New end time (ISO 8601)'),
      status: z.enum(['SCHEDULED', 'ACTIVE', 'COMPLETED', 'CANCELED']).optional().describe('New status'),
      location: z.string().optional().describe('New location'),
      reason: z.string().optional().describe('Reason for modifying'),
    },
  • Registration of the 'modify_event' tool via server.tool(), including name, description, schema, and handler function within the registerEventTools function.
    server.tool(
      'modify_event',
      'Modify a scheduled event',
      {
        guildId: z.string().describe('The ID of the server (guild)'),
        eventId: z.string().describe('The ID of the event'),
        name: z.string().optional().describe('New name'),
        description: z.string().optional().describe('New description'),
        scheduledStartTime: z.string().optional().describe('New start time (ISO 8601)'),
        scheduledEndTime: z.string().optional().describe('New end time (ISO 8601)'),
        status: z.enum(['SCHEDULED', 'ACTIVE', 'COMPLETED', 'CANCELED']).optional().describe('New status'),
        location: z.string().optional().describe('New location'),
        reason: z.string().optional().describe('Reason for modifying'),
      },
      async ({ guildId, eventId, name, description, scheduledStartTime, scheduledEndTime, status, location, reason }) => {
        const result = await withErrorHandling(async () => {
          const client = await getDiscordClient();
          const guild = await client.guilds.fetch(guildId);
          const event = await guild.scheduledEvents.fetch(eventId);
    
          const statusMap: Record<string, GuildScheduledEventStatus> = {
            'SCHEDULED': GuildScheduledEventStatus.Scheduled,
            'ACTIVE': GuildScheduledEventStatus.Active,
            'COMPLETED': GuildScheduledEventStatus.Completed,
            'CANCELED': GuildScheduledEventStatus.Canceled,
          };
    
          const editData: Record<string, unknown> = {};
          if (name) editData.name = name;
          if (description) editData.description = description;
          if (scheduledStartTime) editData.scheduledStartTime = scheduledStartTime;
          if (scheduledEndTime) editData.scheduledEndTime = scheduledEndTime;
          if (status) editData.status = statusMap[status];
          if (location) editData.entityMetadata = { location };
          if (reason) editData.reason = reason;
    
          const updated = await event.edit(editData);
    
          return {
            id: updated.id,
            name: updated.name,
            status: GuildScheduledEventStatus[updated.status],
            message: 'Event updated 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)
    Invocation of registerEventTools(server) which registers the modify_event tool among other event tools on the main MCP server instance.
    registerEventTools(server);
  • src/index.ts:20-20 (registration)
    Import of registerEventTools function that defines and registers the modify_event tool.
    import { registerEventTools } from './tools/event-tools.js';
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but offers minimal information. It states the action ('modify') but doesn't describe permissions required, whether changes are reversible, rate limits, error conditions, or what happens to unspecified fields. For a mutation tool with 9 parameters, this leaves significant behavioral gaps for the agent.

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, clear sentence with zero wasted words. It's front-loaded with the core action ('modify a scheduled event') and doesn't include unnecessary elaboration. Every word earns its place, making it highly efficient 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?

For a complex mutation tool with 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address behavioral aspects like permissions or side effects, provide usage context, or explain return values. The agent must rely heavily on the schema and external knowledge, leaving gaps in understanding how to use the tool effectively.

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%, so all parameters are documented in the schema itself. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't explain format constraints beyond ISO 8601 for times or provide examples). This meets the baseline for high schema coverage but doesn't enhance 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 clearly states the verb ('modify') and resource ('a scheduled event'), making the purpose immediately understandable. It distinguishes from sibling tools like 'create_event' and 'delete_event' by focusing on modification rather than creation or deletion. However, it doesn't specify what aspects can be modified or provide additional context beyond the basic action.

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 event), compare with similar tools like 'modify_channel' or 'modify_server', or indicate when other tools might be more appropriate. The agent must infer usage entirely from the tool name and context.

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