fulcrum: "1.0"
name: gws_calendar_insert
description: Create a new Google Calendar event. Supports setting title, time range, attendees, location, and description.

schema:
  input:
    type: object
    properties:
      calendarId:
        type: string
        description: Calendar ID (use "primary" for the main calendar)
        default: "primary"
      summary:
        type: string
        description: "Event title/summary"
      startDateTime:
        type: string
        description: "Event start time (RFC3339, e.g., 2026-03-12T09:00:00+02:00)"
      endDateTime:
        type: string
        description: "Event end time (RFC3339, e.g., 2026-03-12T10:00:00+02:00)"
      description:
        type: string
        description: "Event description/notes"
      location:
        type: string
        description: "Event location (address or room name)"
      attendees:
        type: string
        description: "Comma-separated attendee email addresses"
        examples:
          - "alice@company.com,bob@company.com"
    required:
      - summary
      - startDateTime
      - endDateTime
  output:
    type: object
    properties:
      id:
        type: string
      htmlLink:
        type: string
      status:
        type: string

providers:
  primary:
    service: cli
    cost_per_call: 0
    timeout: 15
    config:
      command: gws
      args:
        - calendar
        - "+insert"
        - "--calendar-id"
        - "{calendarId}"
        - "--summary"
        - "{summary}"
        - "--start"
        - "{startDateTime}"
        - "--end"
        - "{endDateTime}"
        - "--description"
        - "{description}"
        - "--location"
        - "{location}"
        - "--attendees"
        - "{attendees}"

cache:
  strategy: none
  ttl: 0

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

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