update_event
Modify Google Calendar event details using an event ID. Update summary, start/end times, description, location, or attendees by passing specific values, ensuring only the provided fields are changed.
Instructions
일정 ID로 일정 정보 수정 (전달된 값만 반영)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attendees | No | ||
| description | No | ||
| end | No | ||
| event_id | Yes | ||
| location | No | ||
| start | No | ||
| summary | No |
Implementation Reference
- google_calendar_mcp/server.py:71-100 (handler)The handler function for the 'update_event' tool. It fetches the existing event by ID, updates only the provided fields (summary, start, end, description, location, attendees), and applies the changes using the Google Calendar API patch method.@mcp.tool() def update_event( event_id: str, summary: Optional[str] = None, start: Optional[str] = None, end: Optional[str] = None, description: Optional[str] = None, location: Optional[str] = None, attendees: Optional[List[str]] = None ) -> dict[str, Any]: """일정 ID로 일정 정보 수정 (전달된 값만 반영)""" service = get_calendar_service() # 기존 이벤트 조회 event = service.events().get(calendarId='primary', eventId=event_id).execute() # 전달된 값만 업데이트 if summary is not None: event['summary'] = summary if description is not None: event['description'] = description if start is not None: event['start'] = {'dateTime': start} if end is not None: event['end'] = {'dateTime': end} if location is not None: event['location'] = location if attendees is not None: event['attendees'] = [{'email': email} for email in attendees] # patch로 업데이트 updated_event = service.events().patch(calendarId='primary', eventId=event_id, body=event).execute() return {"message": "일정이 수정되었습니다.", "event": updated_event}