Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

get_my_hosted_events

Retrieve all events you have organized on the EventHorizon platform to manage and review your hosted activities.

Instructions

Get all events organized by the current user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP server tool registration and handler implementation for 'get_my_hosted_events'. Fetches user's hosted events using the API client, formats them with formatEvent, and returns formatted text content or error.
    server.tool(
      'get_my_hosted_events',
      'Get all events organized by the current user.',
      {},
      async () => {
        try {
          const apiClient = getClient();
          const events = await apiClient.getUserHostedEvents();
          
          if (events.length === 0) {
            return {
              content: [{ type: 'text', text: 'You are not organizing any events.' }]
            };
          }
          
          const formatted = events.map(formatEvent).join('\n\n---\n\n');
          return {
            content: [{ type: 'text', text: `You are organizing ${events.length} event(s):\n\n${formatted}` }]
          };
        } catch (error) {
          return {
            content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }],
            isError: true
          };
        }
      }
    );
  • API client method that performs the HTTP GET request to '/api/events/' with organizer='me' parameter to retrieve events hosted by the current user.
    async getUserHostedEvents(): Promise<Event[]> {
      try {
        const response: AxiosResponse<Event[]> = await this.client.get('/api/events/', { params: { organizer: 'me' } });
        return response.data;
      } catch (error) {
        throw new Error(`Failed to get user hosted events: ${getErrorMessage(error)}`);
      }
    }
  • Helper function to format an individual Event object into a readable string for tool output.
    function formatEvent(event: Event): string {
      return `Event: ${event.title} (ID: ${event.id})
      Description: ${event.description}
      Location: ${event.location}
      Start: ${event.start_time}
      End: ${event.end_time}
      Capacity: ${event.capacity}
      Organizer: ${event.organizer.username}
      Registered: ${event.is_registered ? 'Yes' : 'No'}`;
    }
  • TypeScript interface defining the structure of an Event object used throughout the codebase.
    export interface Event {
      id: number;
      title: string;
      slug: string;
      description: string;
      start_time: string;
      end_time: string;
      location: string;
      capacity: number;
      organizer: User;
      registration_schema: Record<string, unknown>[];
      is_registered: boolean;
      created_at: string;
      updated_at: string;
    }
  • Lazy-initializes and returns the shared EventHorizonClient instance used by all tools.
    function getClient(): EventHorizonClient {
      if (!client) {
        const errors = validateConfig();
        if (errors.length > 0) {
          throw new Error(`Configuration errors: ${errors.join('; ')}`);
        }
        client = new EventHorizonClient();
      }
      return client;
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves events but doesn't specify whether this is a read-only operation, what permissions are required, how results are formatted (e.g., pagination, sorting), or any rate limits. This leaves significant gaps in understanding the tool's behavior beyond basic functionality.

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 efficiently conveys the core purpose without any wasted words. It is front-loaded with the essential action and resource, making it highly concise and well-structured for quick comprehension.

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 likely returns a list of events. It doesn't explain what data is returned (e.g., event details, formats), error conditions, or behavioral traits like authentication needs. For a retrieval tool in a context with multiple event-related siblings, this leaves too many open questions.

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 input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description adds no parameter information, which is appropriate here, but it doesn't explicitly state that no parameters are required, slightly reducing clarity. Baseline is 4 for 0 parameters, as the schema fully covers the absence of inputs.

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 action ('Get') and resource ('events organized by the current user'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_events' or 'get_event', which could retrieve different event sets, leaving some ambiguity in sibling context.

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 such as 'list_events' (which might retrieve all events) or 'get_event' (which retrieves a specific event). It implies usage for the current user's events but offers no exclusions or prerequisites, resulting in minimal usage direction.

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