Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

get_my_registrations

Retrieve all events you have registered for through the EventHorizon platform. View your current event registrations and manage your attendance.

Instructions

Get all events the current user is registered for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Full MCP tool definition including registration, empty input schema, and handler logic. The handler retrieves the user's registrations via the API client, formats them using formatRegistration, handles empty list and errors, and returns formatted text content.
    server.tool( 'get_my_registrations', 'Get all events the current user is registered for.', {}, async () => { try { const apiClient = getClient(); const registrations = await apiClient.getUserRegistrations(); if (registrations.length === 0) { return { content: [{ type: 'text', text: 'You are not registered for any events.' }] }; } const formatted = registrations.map(formatRegistration).join('\n\n---\n\n'); return { content: [{ type: 'text', text: `You have ${registrations.length} registration(s):\n\n${formatted}` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
  • EventHorizonClient helper method that implements the core API call (GET /api/registrations/) to fetch the current user's registrations, with error handling.
    async getUserRegistrations(): Promise<Registration[]> { try { const response: AxiosResponse<Registration[]> = await this.client.get('/api/registrations/'); return response.data; } catch (error) { throw new Error(`Failed to get user registrations: ${getErrorMessage(error)}`); } }
  • TypeScript interface defining the structure of Registration objects used by the tool's API response and formatting logic.
    export interface Registration { id: number; event: Event | number; user: User | number; status: 'pending' | 'approved' | 'waitlisted' | 'cancelled'; answers: Record<string, unknown>; registered_at: string; updated_at: string; }
  • Helper function to format individual Registration objects into a human-readable string for inclusion in the tool's response.
    function formatRegistration(reg: Registration): string { const eventInfo = typeof reg.event === 'object' ? reg.event.title : `Event ID: ${reg.event}`; const userInfo = typeof reg.user === 'object' ? reg.user.username : `User ID: ${reg.user}`; return `Registration (ID: ${reg.id}) Event: ${eventInfo} User: ${userInfo} Status: ${reg.status} Registered at: ${reg.registered_at}`; }

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