Skip to main content
Glama

update_event

Modify existing Outlook calendar events by updating details like subject, time, location, or description using the event ID.

Instructions

Update an existing calendar event

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
eventIdYesEvent ID to update
subjectNoNew event subject/title (optional)
startDateNoNew start date in MM/DD/YYYY format (optional)
startTimeNoNew start time in HH:MM AM/PM format (optional)
endDateNoNew end date in MM/DD/YYYY format (optional)
endTimeNoNew end time in HH:MM AM/PM format (optional)
locationNoNew event location (optional)
bodyNoNew event description/body (optional)
calendarNoCalendar name (optional)

Implementation Reference

  • src/index.ts:332-377 (registration)
    Registers the update_event tool in the MCP server's tool list, including its description and input schema definition.
    {
      name: "update_event",
      description: "Update an existing calendar event",
      inputSchema: {
        type: "object",
        properties: {
          eventId: {
            type: "string",
            description: "Event ID to update"
          },
          subject: {
            type: "string",
            description: "New event subject/title (optional)"
          },
          startDate: {
            type: "string",
            description: "New start date in MM/DD/YYYY format (optional)"
          },
          startTime: {
            type: "string",
            description: "New start time in HH:MM AM/PM format (optional)"
          },
          endDate: {
            type: "string",
            description: "New end date in MM/DD/YYYY format (optional)"
          },
          endTime: {
            type: "string",
            description: "New end time in HH:MM AM/PM format (optional)"
          },
          location: {
            type: "string",
            description: "New event location (optional)"
          },
          body: {
            type: "string",
            description: "New event description/body (optional)"
          },
          calendar: {
            type: "string",
            description: "Calendar name (optional)"
          }
        },
        required: ["eventId"]
      }
    },
  • MCP server dispatch handler for update_event tool calls, which extracts parameters and delegates to OutlookManager.updateEvent.
    case 'update_event': {
      const result = await outlookManager.updateEvent({
        eventId: (args as any)?.eventId,
        subject: (args as any)?.subject,
        startDate: (args as any)?.startDate,
        startTime: (args as any)?.startTime,
        endDate: (args as any)?.endDate,
        endTime: (args as any)?.endTime,
        location: (args as any)?.location,
        body: (args as any)?.body,
        calendar: (args as any)?.calendar
      });
      return {
        content: [
          {
            type: 'text',
            text: `${result.success ? '✅' : '❌'} **Event Update**\n\n${result.message}`,
          },
        ],
      };
    }
  • Core implementation of the update_event tool in OutlookManager class. Parses input options, constructs PowerShell script to update Outlook appointment via COM, executes it, and returns success/error status.
    async updateEvent(options: {
      eventId: string;
      subject?: string;
      startDate?: string;
      startTime?: string;
      endDate?: string;
      endTime?: string;
      location?: string;
      body?: string;
      calendar?: string;
    }): Promise<{ success: boolean; message: string }> {
      try {
        const calendarName = options.calendar || '';
        let startDateTime = '';
        let endDateTime = '';
        
        if (options.startDate && options.startTime) {
          startDateTime = `${options.startDate} ${options.startTime}`;
        }
        
        if (options.endDate && options.endTime) {
          endDateTime = `${options.endDate} ${options.endTime}`;
        } else if (startDateTime) {
          // Default to 30 minutes after start
          endDateTime = 'ADD30MIN';
        }
        
        const script = `
          try {
            Add-Type -AssemblyName "Microsoft.Office.Interop.Outlook" -ErrorAction Stop
            $outlook = New-Object -ComObject Outlook.Application -ErrorAction Stop
            $namespace = $outlook.GetNamespace("MAPI")
            
            # Get appointment
            $appointment = $namespace.GetItemFromID("${options.eventId.replace(/"/g, '""')}")
            
            if (-not $appointment) {
              throw "Event not found with ID: ${options.eventId.replace(/"/g, '""')}"
            }
            
            # Update properties
            ${options.subject ? `$appointment.Subject = "${options.subject.replace(/"/g, '""')}"` : ''}
            ${startDateTime ? `$appointment.Start = [DateTime]"${startDateTime.replace(/"/g, '""')}"` : ''}
            ${endDateTime === 'ADD30MIN' ? `$appointment.End = $appointment.Start.AddMinutes(30)` : endDateTime ? `$appointment.End = [DateTime]"${endDateTime.replace(/"/g, '""')}"` : ''}
            ${options.location ? `$appointment.Location = "${options.location.replace(/"/g, '""')}"` : ''}
            ${options.body ? `$appointment.Body = "${options.body.replace(/"/g, '""')}"` : ''}
            
            $appointment.Save()
            
            Write-Output ([PSCustomObject]@{
              Success = $true
            } | ConvertTo-Json -Compress)
            
          } catch {
            Write-Output ([PSCustomObject]@{
              Success = $false
              Error = $_.Exception.Message
            } | ConvertTo-Json -Compress)
          }
        `;
    
        const result = await this.executePowerShell(script);
        const cleanResult = result.replace(/[\u0000-\u0008\u000B\u000C\u000E-\u001F\u007F]/g, '').trim();
        const data = JSON.parse(cleanResult);
    
        if (!data.Success) {
          throw new Error(data.Error || 'Failed to update event');
        }
    
        return {
          success: true,
          message: 'Event updated successfully'
        };
      } catch (error) {
        throw new Error(`Failed to update event: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update an existing calendar event' implies mutation but doesn't specify what happens with partial updates, whether changes are reversible, permission requirements, or rate limits. This is inadequate for a mutation tool with zero annotation coverage.

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, efficient sentence with zero wasted words. It's appropriately sized and front-loaded with the core functionality.

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 9 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address behavioral aspects like error conditions, partial update behavior, or what the tool returns. The 100% schema coverage helps with parameters but doesn't compensate for missing operational context.

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%, so all parameters are documented in the schema. The description doesn't add any meaningful parameter semantics beyond what's already in the schema (e.g., it doesn't explain relationships between date/time parameters or provide usage examples). Baseline 3 is appropriate when schema does the heavy lifting.

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 target resource ('an existing calendar event'), providing a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'set_show_as' or 'duplicate_email_as_draft' which might also modify events in some way.

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?

No guidance is provided about when to use this tool versus alternatives. The description doesn't mention prerequisites (e.g., needing an existing event ID), exclusions, or when other tools like 'create_event_with_show_as' or 'delete_event' would be more appropriate.

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/cqyefeng119/windows-outlook-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server