Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

unregister_from_event

Remove your registration from a specific event in the EventHorizon platform by providing the event ID.

Instructions

Unregister the current user from an event.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesThe ID of the event to unregister from

Implementation Reference

  • MCP tool registration and inline handler function for 'unregister_from_event'. This is the primary implementation that gets the API client, calls unregisterFromEvent, and formats the response.
    server.tool(
      'unregister_from_event',
      'Unregister the current user from an event.',
      {
        event_id: z.number().describe('The ID of the event to unregister from')
      },
      async ({ event_id }) => {
        try {
          const apiClient = getClient();
          await apiClient.unregisterFromEvent(event_id);
          return {
            content: [{ type: 'text', text: `Successfully unregistered from event ${event_id}.` }]
          };
        } catch (error) {
          return {
            content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }],
            isError: true
          };
        }
      }
    );
  • Zod schema defining the input parameter 'event_id' for the tool.
    {
      event_id: z.number().describe('The ID of the event to unregister from')
    },
  • Helper method in EventHorizonClient that performs the actual API DELETE request to unregister the user from the event.
    async unregisterFromEvent(eventId: number): Promise<void> {
      try {
        await this.client.delete(`/api/events/${eventId}/unregister/`);
      } catch (error) {
        throw new Error(`Failed to unregister from event ${eventId}: ${getErrorMessage(error)}`);
      }
    }

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/NotoriousArnav/EventHorizon-MCP'

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