Skip to main content
Glama
NotoriousArnav

EventHorizon MCP Server

update_event

Modify event details such as title, time, location, or capacity by providing 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

  • src/index.ts:142-176 (registration)
    Full registration of the 'update_event' MCP tool, including name, description, input schema, and handler function.
    server.tool(
      'update_event',
      'Update an existing event. Only provide the fields you want to change.',
      {
        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')
      },
      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
          };
        }
      }
    );
  • The handler function for the 'update_event' tool. It constructs a partial update object from provided parameters and calls the apiClient.updateEvent method, returning formatted success or error response.
    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 input schema defining parameters for the 'update_event' tool.
    {
      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')
    },
  • API client helper method 'updateEvent' that performs the HTTP PUT request to update an event via the EventHorizon 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)}`);
      }
    }
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. While 'Update an existing event' implies a mutation operation, the description doesn't address critical behavioral aspects like authentication requirements, error handling (e.g., what happens if the event doesn't exist), side effects, or response format. The partial update guidance is helpful but insufficient for a mutation tool.

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 extremely concise with just two sentences that are front-loaded and waste no words. Every sentence adds value: the first states the core purpose, and the second provides important usage guidance about partial updates.

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?

For a mutation tool with 7 parameters, no annotations, and no output schema, the description is incomplete. It lacks information about authentication, error conditions, response format, and how the update interacts with other tools (e.g., event registrations). The partial update guidance is helpful but doesn't compensate for these significant gaps.

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

Parameters3/5

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

Schema description coverage is 100%, with each parameter clearly documented in the input schema. The description adds minimal value beyond the schema by emphasizing partial updates ('Only provide the fields you want to change'), which is useful context but doesn't provide additional semantic details about the parameters themselves.

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 ('Update') and resource ('an existing event'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'create_event' beyond the obvious 'update' vs 'create' distinction, which is why it doesn't reach 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 provides some usage guidance with 'Only provide the fields you want to change,' which implies partial updates are supported. However, it doesn't explicitly state when to use this tool versus alternatives like 'create_event' or 'delete_event,' nor does it mention prerequisites or error conditions.

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