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;
    }
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 it's a read operation ('Get'), which implies non-destructive behavior, but doesn't cover aspects like authentication needs (e.g., if it requires user login), rate limits, error conditions, or return format. This leaves significant gaps for a tool with zero annotation coverage.

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 that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy to understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters, no annotations, and no output schema, the description is minimal but covers the basic purpose. However, it lacks details on behavior (e.g., authentication, return format) and doesn't fully compensate for the absence of structured data, making it adequate but with clear gaps for a read operation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there's no need for parameter details in the description. The description appropriately doesn't mention any parameters, which is efficient. A baseline of 4 is given since it avoids unnecessary information, though it doesn't add value beyond the schema (which is fine here).

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 ('all events the current user is registered for'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_my_hosted_events' or 'get_event_registrations', which prevents 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by stating 'the current user,' suggesting it's for retrieving one's own registrations. However, it doesn't explicitly say when to use this versus alternatives like 'get_event_registrations' (which might list all registrations for an event) or 'list_events' (which might show all events regardless of registration). No clear exclusions or prerequisites are mentioned.

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

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