add_calendar_event
Create a new calendar event with title, time, and optional attendees.Parameters
The title/summary of the event
Start date/time. Supports flexible formats:
- Natural language:
"tomorrow at 2pm","next Tuesday" - ISO 8601:
"2026-01-21T14:00:00"
End date/time. If not provided, defaults to 1 hour after start
Duration of the event (e.g.,
"1 hour", "30 minutes"). Used if end_time not providedEvent description or notes
List of attendee email addresses
Timezone for the event (e.g.,
"America/New_York", "UTC")Returns
Whether the operation succeeded
The unique ID of the created event
Confirmation message
Full event object from Google Calendar API
Example
delete_calendar_event
Delete a calendar event by its ID. Always confirm with the user before deleting.Parameters
The unique ID of the event to delete
Returns
Whether the operation succeeded
Confirmation message
Error details if operation failed
Example
search_calendar_events
Search for calendar events by title keyword. Use this to find specific events before updating or deleting them.Parameters
Search term to find in event titles
Maximum number of events to return (1-50)
Returns
Whether the operation succeeded
Summary message
List of matching events with
id, title, start, and end fieldsExample
list_calendar_events
List upcoming calendar events within a time range. Use this to show the user their schedule.Parameters
Maximum number of events to return (1-100)
Start of time range. Supports:
- Natural language:
"today","next week" - ISO 8601:
"2026-01-21"
End of time range. Supports:
- Natural language:
"next week","end of month" - ISO 8601:
"2026-01-28"
Returns
Whether the operation succeeded
Summary message
List of events with
id, title, start, end, and description fieldsExample
update_calendar_event
Update an existing calendar event’s details. Can modify title, times, or description.Parameters
The unique ID of the event to update
New event title
New start date/time
New end date/time
New event description
Returns
Whether the operation succeeded
Confirmation message
Updated event object from Google Calendar API
Example
Implementation Details
All calendar tools interact with the Google Calendar API through theCalendarService class located in services/calendar.py:12-334. The service:
- Uses the primary calendar (
"primary") by default - Handles ISO 8601 datetime formatting
- Supports flexible timezone handling
- Provides detailed error messages for debugging
- Returns structured responses with
success,message, and data fields
Common Response Pattern
All calendar tools return a dictionary with:Best Practices
- Search before delete/update: Always use
search_calendar_eventsto find event IDs before modifying events - Confirm destructive operations: Always confirm with the user before calling
delete_calendar_event - Handle timezones: Specify the user’s timezone explicitly to avoid confusion
- Natural language dates: The agent can parse natural language dates - use them for better UX