Tools

Calendar

List, create, update, and delete events on Google Calendar or Apple CalDAV.

Introduction

The Calendar tool manages events on either Google Calendar or any CalDAV server, including Apple's iCloud calendars. One driver is active at a time, chosen via LARACLAW_CALENDAR_DRIVER.

Choosing a Driver

LARACLAW_CALENDAR_DRIVER=google
# or
LARACLAW_CALENDAR_DRIVER=apple

Leaving it unset disables the tool.

Google Calendar Setup

You'll need a Google Cloud project with the Calendar API enabled and an OAuth client (desktop type). Run:

php artisan laraclaw:setup-calendar

The wizard walks you through authorizing the app and storing the OAuth token. It sets:

LARACLAW_CALENDAR_DRIVER=google
LARACLAW_GOOGLE_CREDENTIALS_JSON=oauth-credentials.json
LARACLAW_GOOGLE_TOKEN_JSON=oauth-token.json
LARACLAW_GOOGLE_CALENDAR_ID=primary

Laraclaw extends Spatie's Google Calendar integration to refresh and persist the OAuth token when it expires.

Apple CalDAV Setup

You'll need an app-specific password from your Apple ID account.

LARACLAW_CALENDAR_DRIVER=apple
LARACLAW_APPLE_CALDAV_SERVER=https://caldav.icloud.com
LARACLAW_APPLE_CALDAV_USERNAME=you@icloud.com
LARACLAW_APPLE_CALDAV_PASSWORD=xxxx-xxxx-xxxx-xxxx
LARACLAW_APPLE_CALDAV_CALENDAR=Home

The same driver works for any CalDAV server. Point LARACLAW_APPLE_CALDAV_SERVER at whatever endpoint you use.

Listing Events

ParameterRequiredDescription
operationYeslist
startYesRange start. ISO 8601 or plain English ("tomorrow at 10am", "in 3 hours").
endYesRange end

Returns a JSON array of events with id, title, start, end, description, location, and attendees.

Creating and Updating Events

ParameterForDescription
operationBothcreate or update
idUpdateThe event ID
titleBothEvent title (required for create)
startBothStart time. Natural language or ISO 8601.
endBothEnd time. Defaults to start + 1 hour on create.
descriptionBothEvent description
locationBothEvent location
attendeesBothArray of email addresses to invite

Update operations are partial. Pass only the fields you want to change.

Deleting Events

ParameterRequiredDescription
operationYesdelete
idYesThe event ID
titleNoUsed in the confirmation prompt

Deletes require confirmation. The user is prompted in chat with the event title first.

Copyright © 2026