Skip to main content
Glama
scarecr0w12

discord-mcp

get_event_info

Retrieve detailed information about Discord scheduled events by providing server and event IDs to manage server activities.

Instructions

Get detailed information about a scheduled event

Input Schema

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

Implementation Reference

  • The core handler function that fetches detailed scheduled event information from Discord API using guild and event IDs, formats the response, handles errors with withErrorHandling, and returns JSON string.
    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);
    
        return {
          id: event.id,
          name: event.name,
          description: event.description,
          scheduledStartTime: event.scheduledStartAt?.toISOString(),
          scheduledEndTime: event.scheduledEndAt?.toISOString(),
          privacyLevel: GuildScheduledEventPrivacyLevel[event.privacyLevel],
          status: GuildScheduledEventStatus[event.status],
          entityType: GuildScheduledEventEntityType[event.entityType],
          entityId: event.entityId,
          channelId: event.channelId,
          creatorId: event.creatorId,
          creator: event.creator ? { id: event.creator.id, username: event.creator.username } : null,
          userCount: event.userCount,
          location: event.entityMetadata?.location,
          image: event.coverImageURL(),
          url: event.url,
        };
      });
    
      if (!result.success) {
        return { content: [{ type: 'text', text: result.error }], isError: true };
      }
    
      return { content: [{ type: 'text', text: JSON.stringify(result.data, null, 2) }] };
    }
  • Zod input schema defining required parameters: guildId (server ID) and eventId.
      guildId: z.string().describe('The ID of the server (guild)'),
      eventId: z.string().describe('The ID of the event'),
    },
  • MCP server.tool registration call for 'get_event_info' tool, including name, description, input schema, and inline handler function.
    server.tool(
      'get_event_info',
      'Get detailed information about a scheduled event',
      {
        guildId: z.string().describe('The ID of the server (guild)'),
        eventId: z.string().describe('The ID of the event'),
      },
      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);
    
          return {
            id: event.id,
            name: event.name,
            description: event.description,
            scheduledStartTime: event.scheduledStartAt?.toISOString(),
            scheduledEndTime: event.scheduledEndAt?.toISOString(),
            privacyLevel: GuildScheduledEventPrivacyLevel[event.privacyLevel],
            status: GuildScheduledEventStatus[event.status],
            entityType: GuildScheduledEventEntityType[event.entityType],
            entityId: event.entityId,
            channelId: event.channelId,
            creatorId: event.creatorId,
            creator: event.creator ? { id: event.creator.id, username: event.creator.username } : null,
            userCount: event.userCount,
            location: event.entityMetadata?.location,
            image: event.coverImageURL(),
            url: event.url,
          };
        });
    
        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 in the main MCP server setup, which registers the get_event_info tool along with other event tools.
    registerEventTools(server);
  • Import of withErrorHandling utility used in the get_event_info handler for error management.
    import { withErrorHandling } from '../utils/error-handler.js';
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 this is a read operation ('Get'), implying it's non-destructive, but doesn't cover critical aspects like authentication requirements, rate limits, error conditions, or the format/scope of the returned 'detailed information'. For a tool with zero annotation coverage, this is a significant gap.

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 directly states the tool's purpose without unnecessary words. It's front-loaded with the core action ('Get detailed information'), making it easy to parse quickly. Every word earns its place.

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 lack of annotations and output schema, the description is incomplete for a tool that presumably returns complex event data. It doesn't hint at what 'detailed information' includes (e.g., event metadata, participants, timestamps), nor does it address behavioral aspects like permissions or errors. For a read operation with no structured output documentation, this leaves significant gaps.

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?

The input schema has 100% description coverage, with clear documentation for both parameters ('guildId' and 'eventId'). The description doesn't add any meaningful semantic context beyond what the schema already provides (e.g., it doesn't explain how to obtain these IDs or their format), so it meets the baseline for high schema coverage.

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 ('Get') and resource ('detailed information about a scheduled event'), making the purpose specific and understandable. However, it doesn't distinguish this tool from potential siblings like 'get_event_subscribers' or 'list_events' that might also retrieve event-related data, preventing a perfect score.

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 guild and event IDs), exclusions, or comparisons to sibling tools like 'list_events' or 'get_event_subscribers', leaving the agent to infer usage 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