Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

update_event

Modify existing events by updating specific fields like title, time, location, or capacity. Provide only the fields you need to change.

Instructions

Update an existing event. Only provide the fields you want to change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesThe ID of the event to update
titleNoNew title for the event
descriptionNoNew description for the event
start_timeNoNew start time in ISO 8601 format
end_timeNoNew end time in ISO 8601 format
locationNoNew location for the event
capacityNoNew capacity for the event

Implementation Reference

  • The main handler function for the 'update_event' tool. It collects optional update fields into updateData, calls the API client's updateEvent method, formats the response with formatEvent, or returns an error.
    async ({ event_id, title, description, start_time, end_time, location, capacity }) => { try { const apiClient = getClient(); const updateData: Record<string, unknown> = {}; if (title !== undefined) updateData.title = title; if (description !== undefined) updateData.description = description; if (start_time !== undefined) updateData.start_time = start_time; if (end_time !== undefined) updateData.end_time = end_time; if (location !== undefined) updateData.location = location; if (capacity !== undefined) updateData.capacity = capacity; const event = await apiClient.updateEvent(event_id, updateData); return { content: [{ type: 'text', text: `Event updated 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 update_event tool, with event_id required and others optional.
    { event_id: z.number().describe('The ID of the event to update'), title: z.string().optional().describe('New title for the event'), description: z.string().optional().describe('New description for the event'), start_time: z.string().optional().describe('New start time in ISO 8601 format'), end_time: z.string().optional().describe('New end time in ISO 8601 format'), location: z.string().optional().describe('New location for the event'), capacity: z.number().optional().describe('New capacity for the event') },
  • src/index.ts:142-143 (registration)
    Registration of the 'update_event' tool on the MCP server, specifying name and description.
    server.tool( 'update_event',
  • Helper method in EventHorizonClient that performs the HTTP PUT request to update an event on the backend API.
    async updateEvent(eventId: number, eventData: Partial<EventCreateRequest>): Promise<Event> { try { const response: AxiosResponse<Event> = await this.client.put(`/api/events/${eventId}/`, eventData); return response.data; } catch (error) { throw new Error(`Failed to update event ${eventId}: ${getErrorMessage(error)}`); } }
  • TypeScript interface used for event creation and update data (Partial<EventCreateRequest> in updateEvent).
    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