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.
Prerequisites
Section titled “Prerequisites”Make sure the CLI is installed and authenticated. If not, follow the AI agents quickstart first.
nylas auth whoami --jsonList upcoming events
Section titled “List upcoming events”See what’s on the user’s calendar. The --days flag controls the lookahead window.
nylas calendar events list --days 7 --jsonView details for a specific event:
nylas calendar events show <EVENT_ID> --jsonCreate an event
Section titled “Create an event”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:
Find available times
Section titled “Find available times”Before scheduling, check when participants are free. This queries across multiple users’ calendars and returns open slots.
nylas calendar find-time \ --duration 30m \ --jsonUpdate and cancel events
Section titled “Update and cancel events”# Update an eventnylas calendar events update <EVENT_ID> \ --title "Updated: Project kickoff" \ --start "2026-04-15T14:00:00" \ --end "2026-04-15T15:00:00"
# Delete an eventnylas calendar events delete <EVENT_ID> --yesList calendars
Section titled “List calendars”Each user can have multiple calendars. List them to find the right one for event operations.
nylas calendar list --jsonExample: scheduling assistant workflow
Section titled “Example: scheduling assistant workflow”Here’s a realistic pattern for an agent that handles meeting requests:
# 1. Check the user's schedule for next weeknylas calendar events list --days 7 --json
# 2. Find a time that works for all participantsnylas calendar find-time \ --duration 60m \ --json
# 3. (Agent picks the best slot based on preferences)
# 4. Create the meetingnylas 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 emailnylas email send \ --subject "Meeting scheduled: Q3 planning" \ --body "I've scheduled Q3 planning for April 16 at 10am. Calendar invite sent." \ --yesUsing MCP instead
Section titled “Using MCP instead”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-codeSee the MCP docs for details.
What’s next
Section titled “What’s next”- Give your agent email access — read, send, and search email
- Give your agent call recordings — record meetings and get transcripts
- AI agents quickstart — full CLI setup and command reference
- CLI guides — 85+ step-by-step guides for email, calendar, and more