Public Beta
Not set

Experience

Changes how pages explain things, never what you can do.

More

Experience

Changes how pages explain things, never what you can do.

Sign inGet started

Calendar Assistant v0.1.2 · claude-code

Archive SHA-256 08bc85b1b22be3f04cfbd34e3a92648949eead5c7907a66c52bdef468e72def9 · 41.4 KB · built Nov 27, 2026

README.md

# Calendar Assistant (AgentRove native agent)

`agentrove.calendar-assistant` 0.1.2 · MIT · Node.js >= 20 · no npm dependencies

Published by AgentRove (provisional, configurable name). Package identifiers keep the agentrove prefix for compatibility.

Reads iCalendar (`.ics`) exports, finds free meeting slots inside your working hours, drafts meeting
files, and, only after you confirm, creates an event in Google Calendar through the official API.

## Tools

| Tool | Side effects | What it does |
| --- | --- | --- |
| `parse_ics` | none | Parses `.ics` text into events. Handles `DTSTART`/`DTEND`/`DURATION` with UTC (`Z`), `TZID` (IANA names, common Windows names, vendor-prefixed ids), floating times and all-day `DATE` values. Expands `RRULE` (`FREQ=DAILY/WEEKLY/MONTHLY/YEARLY`, `INTERVAL`, `COUNT`, `UNTIL`, `BYDAY` incl. ordinals such as `2TU` for monthly, `BYMONTHDAY`, `BYMONTH`, `WKST`), `RDATE`, `EXDATE` and `RECURRENCE-ID` overrides. Timed events come back in UTC. |
| `find_free_slots` | none | Given calendars (`.ics` text or parsed events), optional busy intervals, working hours in an IANA time zone, a meeting length and a date range, returns free slots in UTC (with local labels). DST-correct because each day's window is converted with that day's offset. Cancelled and `TRANSP:TRANSPARENT` events do not block time; all-day events block the whole local day unless `all_day_events_block` is `false`. |
| `propose_meeting` | none | Returns a draft `VEVENT` as `.ics` text (times written in UTC, text escaped, lines folded at 75 octets). Nothing is saved or sent. |
| `create_google_event` | external_write | Calls Google Calendar `events.insert`. Refuses to run unless the input has `"confirm": true`, and needs `GOOGLE_CALENDAR_ACCESS_TOKEN`. Sends no invitation emails unless you set `send_updates`. A deterministic event id makes retries safe (HTTP 409 is reported as `already_exists`). |

## Usage (Node CLI)

Run from this folder. Each command prints JSON on stdout. Errors go to stderr as `{"error": code, "message": ...}` and the exit code is 1.

```sh
node bin/cli.js --help

# Parse a calendar export (write the input as a JSON file; easiest on every shell)
node -e "require('fs').writeFileSync('in.json', JSON.stringify({ics: require('fs').readFileSync('my-calendar.ics','utf8'), expand_from:'2026-03-01T00:00:00Z', expand_until:'2026-04-01T00:00:00Z'}))"
node bin/cli.js parse_ics --input in.json

# Free 60-minute slots, 09:00-17:00 New York time, Mon-Fri
# (exclude_past defaults to true, which drops time before now; false here so the example dates work)
node bin/cli.js find_free_slots --json '{"calendars":[{"ics":"BEGIN:VCALENDAR\nBEGIN:VEVENT\nUID:a\nDTSTART:20260309T150000Z\nDTEND:20260309T160000Z\nEND:VEVENT\nEND:VCALENDAR"}],"working_hours":{"timezone":"America/New_York","start":"09:00","end":"17:00"},"duration_minutes":60,"date_from":"2026-03-09","date_to":"2026-03-13","exclude_past":false}'

# Draft a meeting file for review
node bin/cli.js propose_meeting --json '{"title":"Planning","start":"2026-03-10T10:00","timezone":"America/New_York","duration_minutes":30,"attendees":["ana@example.com"]}'

# Create it in Google Calendar (only after you have reviewed the draft)
GOOGLE_CALENDAR_ACCESS_TOKEN=... node bin/cli.js create_google_event --json '{"summary":"Planning","start":"2026-03-10T14:00:00Z","end":"2026-03-10T14:30:00Z","time_zone":"America/New_York","confirm":true}'
```

On Windows PowerShell, prefer `--input file.json` over `--json` to avoid quoting problems.

`create_google_event` needs an OAuth 2.0 access token for your own Google account with the
`https://www.googleapis.com/auth/calendar.events` scope (for example from your own OAuth client or
the Google OAuth Playground). Access tokens expire after about an hour. This agent does not run an
OAuth flow and does not refresh tokens.

## Use as an MCP server

`bin/mcp.js` is a stdio Model Context Protocol server exposing the same four tools.

Claude Code:

```sh
claude mcp add calendar-assistant -- node /absolute/path/to/calendar-assistant/bin/mcp.js
```

Any MCP client that takes a JSON config:

```json
{
  "mcpServers": {
    "calendar-assistant": {
      "command": "node",
      "args": ["/absolute/path/to/calendar-assistant/bin/mcp.js"],
      "env": { "GOOGLE_CALENDAR_ACCESS_TOKEN": "" }
    }
  }
}
```

Leave the token out unless you need `create_google_event`. Keep your MCP client's per-tool approval
prompt switched on for `create_google_event`: over MCP, the `confirm` flag is set by the calling
model, so your client's approval dialog is the human check.

There is also `claude-code/SKILL.md`, a Claude Code skill that runs the CLI.

## Testing status

Tested with Node.js (Vitest, `tests/calendar-assistant.test.ts`, fixtures only, no real network).
It has **not yet been verified inside Claude Code** or any other MCP client by AgentRove.

## Limitations

- `VTIMEZONE` blocks are not evaluated. `TZID`s must be IANA names, common Windows names or
  vendor-prefixed IANA ids; anything else falls back to `default_timezone` with a warning.
- Unsupported `RRULE` parts (`BYSETPOS`, `BYWEEKNO`, `BYYEARDAY`, `BYHOUR`, `BYMINUTE`, `BYSECOND`,
  `FREQ=HOURLY/MINUTELY/SECONDLY`, `YEARLY` + `BYDAY` without `BYMONTH`) are not guessed: only the
  first occurrence is kept and a warning says busy time may be under-reported.
- `RDATE;VALUE=PERIOD` is ignored. `RANGE=THISANDFUTURE` is treated as a single override.
- Time-zone rules come from the ICU data bundled with your Node.js build.
- `find_free_slots` covers at most 93 days per call; `parse_ics` expands at most 3 years.
- Without `expand_from`/`expand_until`, `parse_ics` expands recurring series from 31 days before
  now to 366 days after now, and returns every non-recurring event.
- No CalDAV, Outlook or Google read access: you supply `.ics` exports or events.

Find an agent

Do not include passwords, keys, customer data or other confidential details.
Rule-based matching is free during the public beta (fair use).