Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

create_event

Create new events by specifying title, description, times, location, and capacity for event management and scheduling.

Instructions

Create a new event. Requires title, description, start/end times, location, and capacity.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the event
descriptionYesDescription of the event
start_timeYesStart time in ISO 8601 format (e.g., 2024-12-25T10:00:00Z)
end_timeYesEnd time in ISO 8601 format (e.g., 2024-12-25T18:00:00Z)
locationYesLocation of the event
capacityYesMaximum number of attendees

Implementation Reference

  • The handler function for the 'create_event' MCP tool. It extracts parameters, calls the API client to create the event, formats the response using formatEvent, and returns MCP-formatted content or error.
    async ({ title, description, start_time, end_time, location, capacity }) => { try { const apiClient = getClient(); const event = await apiClient.createEvent({ title, description, start_time, end_time, location, capacity }); return { content: [{ type: 'text', text: `Event created successfully!\n\n${formatEvent(event)}` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
  • Zod schema defining the input parameters for the 'create_event' MCP tool.
    { title: z.string().describe('Title of the event'), description: z.string().describe('Description of the event'), start_time: z.string().describe('Start time in ISO 8601 format (e.g., 2024-12-25T10:00:00Z)'), end_time: z.string().describe('End time in ISO 8601 format (e.g., 2024-12-25T18:00:00Z)'), location: z.string().describe('Location of the event'), capacity: z.number().describe('Maximum number of attendees') },
  • src/index.ts:108-140 (registration)
    Complete registration of the 'create_event' MCP tool using server.tool, including name, description, schema, and inline handler.
    server.tool( 'create_event', 'Create a new event. Requires title, description, start/end times, location, and capacity.', { title: z.string().describe('Title of the event'), description: z.string().describe('Description of the event'), start_time: z.string().describe('Start time in ISO 8601 format (e.g., 2024-12-25T10:00:00Z)'), end_time: z.string().describe('End time in ISO 8601 format (e.g., 2024-12-25T18:00:00Z)'), location: z.string().describe('Location of the event'), capacity: z.number().describe('Maximum number of attendees') }, async ({ title, description, start_time, end_time, location, capacity }) => { try { const apiClient = getClient(); const event = await apiClient.createEvent({ title, description, start_time, end_time, location, capacity }); return { content: [{ type: 'text', text: `Event created successfully!\n\n${formatEvent(event)}` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
  • API client method called by the MCP handler to perform the actual HTTP POST to create the event.
    async createEvent(eventData: EventCreateRequest): Promise<Event> { try { const response: AxiosResponse<Event> = await this.client.post('/api/events/', eventData); return response.data; } catch (error) { throw new Error(`Failed to create event: ${getErrorMessage(error)}`); } }
  • TypeScript interface for the event creation request data structure used by the API client.
    export interface EventCreateRequest { title: string; description: string; start_time: string; end_time: string; location: string; capacity: number; registration_schema?: Record<string, unknown>[]; }

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