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.

7 functions 6 read 1 write Manual OAuth token 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: Manual OAuth token oauth2_manual_token. 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 Secret secret yes Access Token
url GOOGLE_CALENDAR_URL URL url no API Base URL

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.gcalendar_list_events '{
  "calendar_id": "example_calendar_id",
  "timeMin": "example_timeMin",
  "timeMax": "example_timeMax",
  "maxResults": 1,
  "q": "example_q",
  "orderBy": "example_orderBy"
}' --json

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

kosmo integrations:google-calendar gcalendar_list_events '{
  "calendar_id": "example_calendar_id",
  "timeMin": "example_timeMin",
  "timeMax": "example_timeMax",
  "maxResults": 1,
  "q": "example_q",
  "orderBy": "example_orderBy"
}' --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.gcalendar_list_events --json
kosmo integrations:schema google-calendar.gcalendar_list_events --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.gcalendar_list_events

Read read

List events on a Google Calendar. Returns events within a specified time range. Use "primary" as the calendar ID for the user's main calendar.

Parameters
calendar_id, timeMin, timeMax, maxResults, q, orderBy

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_list_events '{"calendar_id":"example_calendar_id","timeMin":"example_timeMin","timeMax":"example_timeMax","maxResults":1,"q":"example_q","orderBy":"example_orderBy"}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_list_events '{"calendar_id":"example_calendar_id","timeMin":"example_timeMin","timeMax":"example_timeMax","maxResults":1,"q":"example_q","orderBy":"example_orderBy"}' --json

google-calendar.gcalendar_get_event

Read read

Get details of a specific event on a Google Calendar. Returns the full event resource including summary, description, attendees, and timing.

Parameters
calendar_id, event_id

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_get_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id"}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_get_event '{"calendar_id":"example_calendar_id","event_id":"example_event_id"}' --json

google-calendar.gcalendar_create_event

Write write

Create a new event on a Google Calendar. Requires at minimum a summary, start time, and end time. Supports adding attendees, location, and description.

Parameters
calendar_id, summary, start, end, description, attendees, location

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_create_event '{"calendar_id":"example_calendar_id","summary":"example_summary","start":"example_start","end":"example_end","description":"example_description","attendees":"example_attendees","location":"example_location"}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_create_event '{"calendar_id":"example_calendar_id","summary":"example_summary","start":"example_start","end":"example_end","description":"example_description","attendees":"example_attendees","location":"example_location"}' --json

google-calendar.gcalendar_list_calendars

Read read

List all calendars on the user's Google Calendar account. Returns calendar IDs, summaries, and metadata for each calendar.

Parameters
maxResults

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_list_calendars '{"maxResults":1}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_list_calendars '{"maxResults":1}' --json

google-calendar.gcalendar_get_calendar

Read read

Get details of a specific Google Calendar by its ID. Returns the calendar resource including summary, description, time zone, and access settings.

Parameters
calendar_id

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_get_calendar '{"calendar_id":"example_calendar_id"}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_get_calendar '{"calendar_id":"example_calendar_id"}' --json

google-calendar.gcalendar_list_colors

Read read

Get the available color definitions for Google Calendar events and calendars. Returns color palettes that can be used when creating or updating events and calendars.

Parameters
none

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_list_colors '{}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_list_colors '{}' --json

google-calendar.gcalendar_get_current_user

Read read

Get the authenticated Google user's profile information, including name, email, and profile picture. Useful for verifying the connected account.

Parameters
none

Generic CLI call

kosmo integrations:call google-calendar.gcalendar_get_current_user '{}' --json

Provider shortcut

kosmo integrations:google-calendar gcalendar_get_current_user '{}' --json

Function Schemas

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

google-calendar.gcalendar_list_events

List events on a Google Calendar. Returns events within a specified time range. Use "primary" as the calendar ID for the user's main calendar.

Operation
Read read
Schema command
kosmo integrations:schema google-calendar.gcalendar_list_events --json
ParameterTypeRequiredDescription
calendar_id string yes Calendar identifier (use "primary" for the user's main calendar, or a specific calendar ID).
timeMin string no Lower bound (exclusive) for event start time, as an RFC 3339 timestamp (e.g., "2026-04-06T00:00:00Z").
timeMax string no Upper bound (exclusive) for event end time, as an RFC 3339 timestamp (e.g., "2026-04-13T00:00:00Z").
maxResults integer no Maximum number of events to return (default: 250, max: 2500).
q string no Free text search to find events matching the query string.
orderBy string no Sort order: "startTime" (requires timeMin/timeMax) or "updated".

google-calendar.gcalendar_get_event

Get details of a specific event on a Google Calendar. Returns the full event resource including summary, description, attendees, and timing.

Operation
Read read
Schema command
kosmo integrations:schema google-calendar.gcalendar_get_event --json
ParameterTypeRequiredDescription
calendar_id string yes Calendar identifier (use "primary" for the user's main calendar).
event_id string yes The unique identifier of the event.

google-calendar.gcalendar_create_event

Create a new event on a Google Calendar. Requires at minimum a summary, start time, and end time. Supports adding attendees, location, and description.

Operation
Write write
Schema command
kosmo integrations:schema google-calendar.gcalendar_create_event --json
ParameterTypeRequiredDescription
calendar_id string yes Calendar identifier (use "primary" for the user's main calendar).
summary string yes Title of the event (e.g., "Team Standup").
start object yes Start time of the event. An object with "dateTime" (RFC 3339) and "timeZone" (e.g., {"dateTime": "2026-04-06T10:00:00+02:00", "timeZone": "Europe/Amsterdam"}). For all-day events use "date" instead of "dateTime".
end object yes End time of the event. Same format as start. Must be after the start time.
description string no Description or notes for the event. Can contain HTML.
attendees array no List of attendee email objects, e.g., [{"email": "[email protected]"}].
location string no Location of the event (e.g., "Conference Room A" or a video call URL).

google-calendar.gcalendar_list_calendars

List all calendars on the user's Google Calendar account. Returns calendar IDs, summaries, and metadata for each calendar.

Operation
Read read
Schema command
kosmo integrations:schema google-calendar.gcalendar_list_calendars --json
ParameterTypeRequiredDescription
maxResults integer no Maximum number of calendars to return (default: 250, max: 2500).

google-calendar.gcalendar_get_calendar

Get details of a specific Google Calendar by its ID. Returns the calendar resource including summary, description, time zone, and access settings.

Operation
Read read
Schema command
kosmo integrations:schema google-calendar.gcalendar_get_calendar --json
ParameterTypeRequiredDescription
calendar_id string yes Calendar identifier (use "primary" for the user's main calendar, or a specific calendar email/ID).

google-calendar.gcalendar_list_colors

Get the available color definitions for Google Calendar events and calendars. Returns color palettes that can be used when creating or updating events and calendars.

Operation
Read read
Schema command
kosmo integrations:schema google-calendar.gcalendar_list_colors --json
ParameterTypeRequiredDescription
No parameters.

google-calendar.gcalendar_get_current_user

Get the authenticated Google user's profile information, including name, email, and profile picture. Useful for verifying the connected account.

Operation
Read read
Schema command
kosmo integrations:schema google-calendar.gcalendar_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

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.