Skip to content
Skip to main content

Give your agent calendar & events access

Your agent needs calendar access to schedule meetings, check when people are free, manage events, and coordinate across time zones. The Nylas CLI gives your agent full calendar access across Google Calendar, Outlook, Exchange, and iCloud through shell commands that return structured JSON.

Make sure the CLI is installed and authenticated. If not, follow the AI agents quickstart first.

nylas auth whoami --json

See what’s on the user’s calendar. The --days flag controls the lookahead window.

nylas calendar events list --days 7 --json

View details for a specific event:

nylas calendar events show <EVENT_ID> --json

Schedule a meeting with participants. The CLI handles timezone conversion and sends invitations automatically.

nylas calendar events create \
--title "Project kickoff" \
--start "2026-04-15T10:00:00" \
--end "2026-04-15T11:00:00" \
--description "Review goals and assign workstreams"

Natural language scheduling:

nylas calendar schedule ai "30 minute sync with [email protected] next Tuesday afternoon"

Before scheduling, check when participants are free. This queries across multiple users’ calendars and returns open slots.

nylas calendar find-time \
--duration 30m \
--json
# Update an event
nylas calendar events update <EVENT_ID> \
--title "Updated: Project kickoff" \
--start "2026-04-15T14:00:00" \
--end "2026-04-15T15:00:00"
# Delete an event
nylas calendar events delete <EVENT_ID> --yes

Each user can have multiple calendars. List them to find the right one for event operations.

nylas calendar list --json

Here’s a realistic pattern for an agent that handles meeting requests:

# 1. Check the user's schedule for next week
nylas calendar events list --days 7 --json
# 2. Find a time that works for all participants
nylas calendar find-time \
--duration 60m \
--json
# 3. (Agent picks the best slot based on preferences)
# 4. Create the meeting
nylas calendar events create \
--title "Q3 planning" \
--start "2026-04-16T10:00:00" \
--end "2026-04-16T11:00:00" \
--description "Quarterly planning session"
# 5. Confirm via email
nylas email send \
--subject "Meeting scheduled: Q3 planning" \
--body "I've scheduled Q3 planning for April 16 at 10am. Calendar invite sent." \
--yes

If your agent supports Model Context Protocol (Claude Code, Cursor, Windsurf, VS Code, Codex CLI), register the CLI as an MCP server for typed calendar tools:

nylas mcp install --assistant claude-code

See the MCP docs for details.