Skip to content

API Reference parrot_tools.google.calendar

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.google.calendar

View source

GoogleCalendarToolkit — Google Calendar v3 event tools (FEAT-453, Module 7).

Goal G6: Google Calendar event tools for the Spanish tax-calendar reminder scheduler (TASK-2394). Built on :class:~parrot.interfaces.google.CalendarClient (promoted from a bare config dict in this same task), which reuses GoogleClient.execute_api_call's existing aiogoogle auth/discovery plumbing — not google-api-python-client, which this repository does not use for Google services (see this task's Completion Note for the Codebase Contract correction).

Class CalendarEvent

Structured representation of a Calendar v3 event — never the raw API dict.

Fields:

Field Type Default Description
id Optional[str] None
summary str
description Optional[str] None
start str
end str
html_link Optional[str] None

Class GoogleCalendarToolkit

Google Calendar v3 event tools: create_event, list_events, update_event.

auto_open = True (FEAT-391): the live :class:CalendarClient is acquired lazily on first tool call via GoogleClient.get_calendar_client().

Parameter Type Default Description
google_client GoogleClient An authenticated :class:~parrot.interfaces.google.GoogleClient.
calendar_id str _DEFAULT_CALENDAR_ID Default Calendar id for every tool call (default "primary"); each method also accepts a per-call override.
**kwargs Any {} Forwarded to :class:AbstractToolkit.

Method GoogleCalendarToolkit.create_event

Create a Calendar v3 event.

create_event(summary: str, start: str, end: str, description: Optional[str] = None, calendar_id: Optional[str] = None) -> Dict[str, Any]

Parameter Type Default Description
summary str Event title.
start str ISO-8601 start datetime — MUST include a timezone offset.
end str ISO-8601 end datetime — MUST include a timezone offset.
description Optional[str] None Optional event description.
calendar_id Optional[str] None Calendar to insert into (defaults to self.calendar_id).

Returns: Dict[str, Any] — {"status": "success", "event": <CalendarEvent dict>}.

Raises:

  • ValueError — If start/end is not a timezone-aware ISO-8601 datetime.

Method GoogleCalendarToolkit.list_events

List events in [time_min, time_max).

list_events(time_min: str, time_max: str, calendar_id: Optional[str] = None) -> Dict[str, Any]

Parameter Type Default Description
time_min str Inclusive lower bound (ISO-8601, RFC3339).
time_max str Exclusive upper bound (ISO-8601, RFC3339).
calendar_id Optional[str] None Calendar to query (defaults to self.calendar_id).

Returns: Dict[str, Any] — {"status": "success", "events": [<CalendarEvent dict>, ...]}.

Method GoogleCalendarToolkit.update_event

Partially update an event — unset fields are left untouched (Calendar v3 PATCH semantics; never a full overwrite/PUT).

update_event(event_id: str, summary: Optional[str] = None, start: Optional[str] = None, end: Optional[str] = None, description: Optional[str] = None, calendar_id: Optional[str] = None) -> Dict[str, Any]

Parameter Type Default Description
event_id str The event to update.
summary Optional[str] None New title, if changing.
start Optional[str] None New ISO-8601 start datetime (timezone-aware), if changing.
end Optional[str] None New ISO-8601 end datetime (timezone-aware), if changing.
description Optional[str] None New description, if changing.
calendar_id Optional[str] None Calendar the event lives in (defaults to self.calendar_id).

Returns: Dict[str, Any] — {"status": "success", "event": <CalendarEvent dict>}.

Raises:

  • ValueError — If a supplied start/end is not timezone-aware.

Attribute logger

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally