Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

delete_event

Remove an event from the EventHorizon platform. This action is restricted to the event organizer to manage their scheduled activities.

Instructions

Delete an event. Only the organizer can delete their events.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
event_idYesThe ID of the event to delete

Implementation Reference

  • src/index.ts:178-198 (registration)
    Registration of the 'delete_event' MCP tool using server.tool(), including description, input schema, and inline handler function.
    server.tool( 'delete_event', 'Delete an event. Only the organizer can delete their events.', { event_id: z.number().describe('The ID of the event to delete') }, async ({ event_id }) => { try { const apiClient = getClient(); await apiClient.deleteEvent(event_id); return { content: [{ type: 'text', text: `Event ${event_id} deleted successfully.` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
  • The handler function for the 'delete_event' tool. It retrieves the API client, calls deleteEvent on it with the provided event_id, and returns a success or error message.
    async ({ event_id }) => { try { const apiClient = getClient(); await apiClient.deleteEvent(event_id); return { content: [{ type: 'text', text: `Event ${event_id} deleted successfully.` }] }; } catch (error) { return { content: [{ type: 'text', text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
  • Zod input schema for the 'delete_event' tool, requiring a single 'event_id' parameter of type number.
    { event_id: z.number().describe('The ID of the event to delete') },
  • API client method that performs the HTTP DELETE request to remove the event from the backend API.
    async deleteEvent(eventId: number): Promise<void> { try { await this.client.delete(`/api/events/${eventId}/`); } catch (error) { throw new Error(`Failed to delete event ${eventId}: ${getErrorMessage(error)}`); } }

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