KosmoKrator

productivity

Google Calendar CLI for AI Agents

Use the Google Calendar CLI from KosmoKrator to call Google Calendar tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

8 functions 5 read 3 write OAuth browser flow auth

Google Calendar CLI Setup

Google Calendar can be configured headlessly with `kosmokrator integrations:configure google_calendar`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure google_calendar --set access_token="$GOOGLE_CALENDAR_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor google_calendar --json
kosmokrator integrations:status --json

Credentials

Authentication type: OAuth browser flow oauth2_authorization_code. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token GOOGLE_CALENDAR_ACCESS_TOKEN OAuth token oauth yes Google Account

Call Google Calendar Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call google_calendar.google_calendar_create_event '{
  "calendar_id": "example_calendar_id",
  "summary": "example_summary",
  "description": "example_description",
  "location": "example_location",
  "start_date_time": "example_start_date_time",
  "end_date_time": "example_end_date_time",
  "start_date": "example_start_date",
  "end_date": "example_end_date"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:google_calendar google_calendar_create_event '{
  "calendar_id": "example_calendar_id",
  "summary": "example_summary",
  "description": "example_description",
  "location": "example_location",
  "start_date_time": "example_start_date_time",
  "end_date_time": "example_end_date_time",
  "start_date": "example_start_date",
  "end_date": "example_end_date"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs google_calendar --json
kosmo integrations:docs google_calendar.google_calendar_create_event --json
kosmo integrations:schema google_calendar.google_calendar_create_event --json
kosmo integrations:search "Google Calendar" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Google Calendar.

google_calendar.google_calendar_create_event

Write write

Create a Google Calendar event. Use startDateTime/endDateTime for timed events, or startDate/endDate for all-day events.

Parameters
calendar_id, summary, description, location, start_date_time, end_date_time, start_date, end_date, time_zone, attendees, recurrence

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_create_event '{"calendar_id":"example_calendar_id","summary":"example_summary","description":"example_description","location":"example_location","start_date_time":"example_start_date_time","end_date_time":"example_end_date_time","start_date":"example_start_date","end_date":"example_end_date"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_create_event '{"calendar_id":"example_calendar_id","summary":"example_summary","description":"example_description","location":"example_location","start_date_time":"example_start_date_time","end_date_time":"example_end_date_time","start_date":"example_start_date","end_date":"example_end_date"}' --json

google_calendar.google_calendar_delete_event

Write write

Delete a Google Calendar event by its ID.

Parameters
calendar_id, event_id

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_delete_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_delete_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id"}' --json

google_calendar.google_calendar_freebusy

Read read

Check free/busy availability across one or more Google Calendars. Returns busy time slots within the specified time range. Useful for finding open slots for scheduling meetings.

Parameters
time_min, time_max, calendar_ids

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_freebusy '{"time_min":"example_time_min","time_max":"example_time_max","calendar_ids":"example_calendar_ids"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_freebusy '{"time_min":"example_time_min","time_max":"example_time_max","calendar_ids":"example_calendar_ids"}' --json

google_calendar.google_calendar_get_event

Read read

Get a single Google Calendar event by its ID.

Parameters
calendar_id, event_id

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_get_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_get_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id"}' --json

google_calendar.google_calendar_list_calendars

Read read

List all Google Calendars the user has access to.

Parameters
max_results, page_token

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_list_calendars '{"max_results":1,"page_token":"example_page_token"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_list_calendars '{"max_results":1,"page_token":"example_page_token"}' --json

google_calendar.google_calendar_list_events

Read read

List or search events in a Google Calendar. Supports date range filtering and text search.

Parameters
calendar_id, time_min, time_max, query, max_results, page_token

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_list_events '{"calendar_id":"example_calendar_id","time_min":"example_time_min","time_max":"example_time_max","query":"example_query","max_results":1,"page_token":"example_page_token"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_list_events '{"calendar_id":"example_calendar_id","time_min":"example_time_min","time_max":"example_time_max","query":"example_query","max_results":1,"page_token":"example_page_token"}' --json

google_calendar.google_calendar_quick_add

Read read

Create a Google Calendar event from natural language text (e.g., "Lunch with Alice tomorrow at noon").

Parameters
calendar_id, text

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_quick_add '{"calendar_id":"example_calendar_id","text":"example_text"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_quick_add '{"calendar_id":"example_calendar_id","text":"example_text"}' --json

google_calendar.google_calendar_update_event

Write write

Update an existing Google Calendar event (partial update). Only specified fields are changed.

Parameters
calendar_id, event_id, summary, description, location, start_date_time, end_date_time, start_date, end_date, time_zone, attendees, recurrence

Generic CLI call

kosmo integrations:call google_calendar.google_calendar_update_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id","summary":"example_summary","description":"example_description","location":"example_location","start_date_time":"example_start_date_time","end_date_time":"example_end_date_time","start_date":"example_start_date"}' --json

Provider shortcut

kosmo integrations:google_calendar google_calendar_update_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id","summary":"example_summary","description":"example_description","location":"example_location","start_date_time":"example_start_date_time","end_date_time":"example_end_date_time","start_date":"example_start_date"}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

google_calendar.google_calendar_create_event

Create a Google Calendar event. Use startDateTime/endDateTime for timed events, or startDate/endDate for all-day events.

Operation
Write write
Schema command
kosmo integrations:schema google_calendar.google_calendar_create_event --json
ParameterTypeRequiredDescription
calendar_id string no Calendar ID (default: "primary").
summary string yes Event title.
description string no Event description.
location string no Event location.
start_date_time string no ISO 8601 start time for timed events (e.g., "2026-02-15T10:00:00-05:00").
end_date_time string no ISO 8601 end time for timed events.
start_date string no YYYY-MM-DD start date for all-day events.
end_date string no YYYY-MM-DD end date for all-day events.
time_zone string no IANA timezone (e.g., "America/New_York"). Applied to start/end times.
attendees string no Comma-separated attendee email addresses.
recurrence string no RRULE recurrence string (e.g., "RRULE:FREQ=WEEKLY;COUNT=10").

google_calendar.google_calendar_delete_event

Delete a Google Calendar event by its ID.

Operation
Write write
Schema command
kosmo integrations:schema google_calendar.google_calendar_delete_event --json
ParameterTypeRequiredDescription
calendar_id string no Calendar ID (default: "primary").
event_id string yes Event ID to delete.

google_calendar.google_calendar_freebusy

Check free/busy availability across one or more Google Calendars. Returns busy time slots within the specified time range. Useful for finding open slots for scheduling meetings.

Operation
Read read
Schema command
kosmo integrations:schema google_calendar.google_calendar_freebusy --json
ParameterTypeRequiredDescription
time_min string yes ISO 8601 start of query range (e.g., "2026-02-14T08:00:00Z").
time_max string yes ISO 8601 end of query range (e.g., "2026-02-14T18:00:00Z").
calendar_ids string no Comma-separated calendar IDs to check (default: "primary").

google_calendar.google_calendar_get_event

Get a single Google Calendar event by its ID.

Operation
Read read
Schema command
kosmo integrations:schema google_calendar.google_calendar_get_event --json
ParameterTypeRequiredDescription
calendar_id string no Calendar ID (default: "primary").
event_id string yes Event ID to retrieve.

google_calendar.google_calendar_list_calendars

List all Google Calendars the user has access to.

Operation
Read read
Schema command
kosmo integrations:schema google_calendar.google_calendar_list_calendars --json
ParameterTypeRequiredDescription
max_results integer no Max results to return (default: 25, max: 250).
page_token string no Pagination token from previous response.

google_calendar.google_calendar_list_events

List or search events in a Google Calendar. Supports date range filtering and text search.

Operation
Read read
Schema command
kosmo integrations:schema google_calendar.google_calendar_list_events --json
ParameterTypeRequiredDescription
calendar_id string no Calendar ID (default: "primary").
time_min string no ISO 8601 start filter (e.g., "2026-02-14T00:00:00Z").
time_max string no ISO 8601 end filter (e.g., "2026-02-21T23:59:59Z").
query string no Free text search within events.
max_results integer no Max results to return (default: 25, max: 250).
page_token string no Pagination token from previous response.

google_calendar.google_calendar_quick_add

Create a Google Calendar event from natural language text (e.g., "Lunch with Alice tomorrow at noon").

Operation
Read read
Schema command
kosmo integrations:schema google_calendar.google_calendar_quick_add --json
ParameterTypeRequiredDescription
calendar_id string no Calendar ID (default: "primary").
text string yes Natural language event text (e.g., "Lunch with Alice tomorrow at noon").

google_calendar.google_calendar_update_event

Update an existing Google Calendar event (partial update). Only specified fields are changed.

Operation
Write write
Schema command
kosmo integrations:schema google_calendar.google_calendar_update_event --json
ParameterTypeRequiredDescription
calendar_id string no Calendar ID (default: "primary").
event_id string yes Event ID to update.
summary string no Event title.
description string no Event description.
location string no Event location.
start_date_time string no ISO 8601 start time for timed events (e.g., "2026-02-15T10:00:00-05:00").
end_date_time string no ISO 8601 end time for timed events.
start_date string no YYYY-MM-DD start date for all-day events.
end_date string no YYYY-MM-DD end date for all-day events.
time_zone string no IANA timezone (e.g., "America/New_York"). Applied to start/end times.
attendees string no Comma-separated attendee email addresses.
recurrence string no RRULE recurrence string (e.g., "RRULE:FREQ=WEEKLY;COUNT=10").

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.