Script Reference
All operations use a single CLI script that returns JSON:
- Success:
{ "ok": true, "data": ... }
- Failure:
{ "ok": false, "error": "..." }
| Script |
Subcommand |
Description |
scripts/gcal.ts |
list |
List events within a date range |
scripts/gcal.ts |
get |
Get full details of a specific event |
scripts/gcal.ts |
create |
Create a new event (requires user confirmation) |
scripts/gcal.ts |
availability |
Check free/busy times across calendars |
scripts/gcal.ts |
rsvp |
Respond to an event invitation (accepted, declined, tentative) |
Usage Examples
# List events in a date range
bun scripts/gcal.ts list --time-min "2024-01-15T00:00:00Z" --time-max "2024-01-22T00:00:00Z"
# Get full details of a specific event
bun scripts/gcal.ts get --event-id "abc123"
# Create a new event (gates on assistant ui confirm)
bun scripts/gcal.ts create --summary "Team Meeting" --start "2024-01-15T09:00:00-05:00" --end "2024-01-15T10:00:00-05:00" --timezone "America/New_York"
# Check availability for a day
bun scripts/gcal.ts availability --time-min "2024-01-15T00:00:00Z" --time-max "2024-01-15T23:59:59Z"
# RSVP to an event invitation
bun scripts/gcal.ts rsvp --event-id "abc123" --response accepted
# Target a specific connected account (see "Multiple Accounts" below)
bun scripts/gcal.ts list --time-min "2024-01-15T00:00:00Z" --time-max "2024-01-22T00:00:00Z" --account "work@example.com"
Every subcommand accepts --account <email> to select which connected Google account the request runs against. When omitted, the request runs against a single account chosen automatically — safe only when exactly one Google account is connected. Each JSON envelope echoes the queried account in an account field when it is reported by the OAuth layer, so an empty result is self-describing (e.g. No events found in the specified time range for work@example.com.).
Connection Setup
- Check connection health first. Run
assistant oauth status google. This checks whether the user's Google account is connected and the token is valid. Google Calendar shares the same OAuth connection as Gmail — if the user already connected Gmail, calendar access is included.
- If the status output shows more than one active connection, you MUST pass
--account <email> on every scripts/gcal.ts invocation, matching the calendar the user is asking about. When the user references a calendar by name or company (e.g. "my Acme calendar"), map it to the connected account email before querying. Omitting --account with multiple connections silently queries one arbitrary account — an empty or partial result then looks like a genuinely free calendar when it is really the wrong account. Confirm the account field in each response matches the account you intended.
- If no connection is found or the status check fails: Load the
vellum-oauth-integrations skill. The skill will evaluate whether managed or your-own mode is appropriate and guide the user accordingly.
Scheduling Playbook
When the user wants to schedule something:
- Always check availability first before proposing times. Use
bun scripts/gcal.ts availability to find free slots.
- Propose 2-3 available time options to the user.
- Once the user picks a time, create the event with
bun scripts/gcal.ts create.
- If adding other attendees, mention that they'll receive an invitation email.
Date & Time Handling
- Use ISO 8601 format for dates and times (e.g.,
2024-01-15T09:00:00-05:00).
- For all-day events, use date-only format (e.g.,
2024-01-15).
- Always ask the user for their timezone if it's not already known from context or their profile.
- When listing events, display times in the user's local timezone.
Confidence & Safety
Create and RSVP are medium-risk operations:
- Create: The
create subcommand gates on assistant ui confirm — it presents a confirmation dialog to the user and only proceeds if approved. Pass --skip-confirm when the user has already given explicit confirmation in the conversation.
- RSVP: The
rsvp subcommand gates on assistant ui confirm — it presents a confirmation dialog showing the event, current status, and new response. Pass --skip-confirm when the user has already given explicit confirmation in the conversation.
Error Recovery
When a calendar script fails with a token or authorization error:
- Try to reconnect silently. Run
assistant oauth ping google. This often resolves expired tokens automatically.
- If reconnection fails, go straight to setup. Don't present options, ask which route the user prefers, or explain what went wrong technically. Just tell the user briefly (e.g., "Google Calendar needs to be reconnected - let me set that up") and immediately load the
vellum-oauth-integrations skill. The user came to you to get something done, not to troubleshoot - make it seamless.
- Never try alternative approaches. Don't use curl, browser automation, or any workaround. If the scripts can't do it, the reconnection flow is the answer.
- Never expose error details. The user doesn't need to see error messages about tokens, OAuth, or API failures. Translate errors into plain language.
1---2name: google-calendar3description: View Google Calendar events for any day, create and manage events, and check availability4---56## Script Reference78All operations use a single CLI script that returns JSON:910- **Success**: `{ "ok": true, "data": ... }`11- **Failure**: `{ "ok": false, "error": "..." }`1213| Script | Subcommand | Description |14| ----------------- | -------------- | -------------------------------------------------------------- |15| `scripts/gcal.ts` | `list` | List events within a date range |16| `scripts/gcal.ts` | `get` | Get full details of a specific event |17| `scripts/gcal.ts` | `create` | Create a new event (**requires user confirmation**) |18| `scripts/gcal.ts` | `availability` | Check free/busy times across calendars |19| `scripts/gcal.ts` | `rsvp` | Respond to an event invitation (accepted, declined, tentative) |2021## Usage Examples2223```bash24# List events in a date range25bun scripts/gcal.ts list --time-min "2024-01-15T00:00:00Z" --time-max "2024-01-22T00:00:00Z"2627# Get full details of a specific event28bun scripts/gcal.ts get --event-id "abc123"2930# Create a new event (gates on assistant ui confirm)31bun scripts/gcal.ts create --summary "Team Meeting" --start "2024-01-15T09:00:00-05:00" --end "2024-01-15T10:00:00-05:00" --timezone "America/New_York"3233# Check availability for a day34bun scripts/gcal.ts availability --time-min "2024-01-15T00:00:00Z" --time-max "2024-01-15T23:59:59Z"3536# RSVP to an event invitation37bun scripts/gcal.ts rsvp --event-id "abc123" --response accepted3839# Target a specific connected account (see "Multiple Accounts" below)40bun scripts/gcal.ts list --time-min "2024-01-15T00:00:00Z" --time-max "2024-01-22T00:00:00Z" --account "work@example.com"41```4243Every subcommand accepts `--account <email>` to select which connected Google account the request runs against. When omitted, the request runs against a single account chosen automatically — safe only when exactly one Google account is connected. Each JSON envelope echoes the queried account in an `account` field when it is reported by the OAuth layer, so an empty result is self-describing (e.g. `No events found in the specified time range for work@example.com.`).4445## Connection Setup46471. **Check connection health first.** Run `assistant oauth status google`. This checks whether the user's Google account is connected and the token is valid. Google Calendar shares the same OAuth connection as Gmail — if the user already connected Gmail, calendar access is included.48 - **If the status output shows more than one active connection, you MUST pass `--account <email>` on every `scripts/gcal.ts` invocation**, matching the calendar the user is asking about. When the user references a calendar by name or company (e.g. "my Acme calendar"), map it to the connected account email before querying. **Omitting `--account` with multiple connections silently queries one arbitrary account** — an empty or partial result then looks like a genuinely free calendar when it is really the wrong account. Confirm the `account` field in each response matches the account you intended.492. **If no connection is found or the status check fails:** Load the `vellum-oauth-integrations` skill. The skill will evaluate whether managed or your-own mode is appropriate and guide the user accordingly.5051## Scheduling Playbook5253When the user wants to schedule something:54551. **Always check availability first** before proposing times. Use `bun scripts/gcal.ts availability` to find free slots.562. Propose 2-3 available time options to the user.573. Once the user picks a time, create the event with `bun scripts/gcal.ts create`.584. If adding other attendees, mention that they'll receive an invitation email.5960## Date & Time Handling6162- Use ISO 8601 format for dates and times (e.g., `2024-01-15T09:00:00-05:00`).63- For all-day events, use date-only format (e.g., `2024-01-15`).64- Always ask the user for their timezone if it's not already known from context or their profile.65- When listing events, display times in the user's local timezone.6667## Confidence & Safety6869Create and RSVP are **medium-risk** operations:7071- **Create**: The `create` subcommand gates on `assistant ui confirm` — it presents a confirmation dialog to the user and only proceeds if approved. Pass `--skip-confirm` when the user has already given explicit confirmation in the conversation.72- **RSVP**: The `rsvp` subcommand gates on `assistant ui confirm` — it presents a confirmation dialog showing the event, current status, and new response. Pass `--skip-confirm` when the user has already given explicit confirmation in the conversation.7374## Error Recovery7576When a calendar script fails with a token or authorization error:77781. **Try to reconnect silently.** Run `assistant oauth ping google`. This often resolves expired tokens automatically.792. **If reconnection fails, go straight to setup.** Don't present options, ask which route the user prefers, or explain what went wrong technically. Just tell the user briefly (e.g., "Google Calendar needs to be reconnected - let me set that up") and immediately load the `vellum-oauth-integrations` skill. The user came to you to get something done, not to troubleshoot - make it seamless.803. **Never try alternative approaches.** Don't use curl, browser automation, or any workaround. If the scripts can't do it, the reconnection flow is the answer.814. **Never expose error details.** The user doesn't need to see error messages about tokens, OAuth, or API failures. Translate errors into plain language.