fulcrum: "1.0"
name: gws_calendar_events
description: List upcoming Google Calendar events. Supports time range filtering and multiple calendars.

schema:
  input:
    type: object
    properties:
      calendarId:
        type: string
        description: Calendar ID (use "primary" for the main calendar)
        default: "primary"
      maxResults:
        type: integer
        description: Maximum number of events to return
        default: 10
      timeMin:
        type: string
        description: "Lower bound for event start time (RFC3339, e.g., 2026-03-11T00:00:00Z)"
      timeMax:
        type: string
        description: "Upper bound for event start time (RFC3339)"
    required: []
  output:
    type: object
    properties:
      items:
        type: array
        items:
          type: object
          properties:
            id:
              type: string
            summary:
              type: string
            start:
              type: object
            end:
              type: object

providers:
  primary:
    service: cli
    cost_per_call: 0
    timeout: 15
    config:
      command: gws
      args:
        - calendar
        - events
        - list
        - "--params"
        - '{"calendarId": "{calendarId}", "maxResults": {maxResults}, "timeMin": "{timeMin}", "singleEvents": true, "orderBy": "startTime"}'

cache:
  strategy: ttl
  ttl: 60

auth:
  required: true
  type: oauth2
  description: "Authenticate via: gws auth login -s calendar"

metadata:
  category: productivity
  tags:
    - google
    - calendar
    - events
    - workspace
    - scheduling
  cost_category: free
  execution_time: fast
  read_only: true
  docs: https://developers.google.com/calendar/api/v3/reference/events/list
