Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

get_my_registrations

Retrieve a list of events you have registered to attend through the EventHorizon platform.

Instructions

Get all events the current user is registered for.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.ts:336-362 (registration)
    Registration of the MCP tool 'get_my_registrations' with server.tool(). Includes tool name, description, empty input schema ({}), and the inline asynchronous handler function that executes the tool logic by calling the API client.
    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 }; } } );
  • The inline handler function for the 'get_my_registrations' tool. It fetches the user's registrations using the EventHorizonClient, formats them using formatRegistration, and returns a formatted text response or error.
    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 }; } }
  • The getUserRegistrations method in EventHorizonClient class, which performs the actual API call to retrieve the current user's registrations from '/api/registrations/' endpoint.
    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 Registration type used by the tool's response data.
    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; }

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