> ## Documentation Index
> Fetch the complete documentation index at: https://docs.avazal.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Events and calendar

> List events and huddles, answer invites, find free time, book meetings and set scheduling preferences.

Events are Google Calendar events and Slack huddles. Reading needs `events:read`; answering invites and booking meetings need `events:write`. Scheduling preferences and which calendars show are [settings](#preferences-and-calendars), with their own scopes.

## List events

`events.list` returns events on the calendars you show in Avazal between `from` and `to`, earliest first. The range can be at most 62 days.

```bash theme={null}
curl -X POST https://api.avazal.com/v1/events.list \
  -H "Authorization: Bearer $AVAZAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from": "2026-12-01T00:00:00Z", "to": "2026-12-08T00:00:00Z", "timeZone": "Europe/London"}'
```

`timeZone` is an IANA time zone name and decides which day all-day events fall on. Each event has its `id` (`cevt_…`), `url`, `title`, `start`, `end`, `allDay`, `status` and a `meetingLink` when there is one. Set `source` to `slack`, or pass `account` (a Slack workspace), to list Slack huddles too; a huddle carries its `conversation` and a `notesFileId` you can read with [`documents.get`](https://docs.avazal.com/guides/documents).

## Read an event

```bash theme={null}
avazal events.get --id cevt_…
```

`events.get` adds the organizer, attendees and their responses, the description, whether it repeats, and the email `thread` about it, if any, which you read with [`conversations.get`](https://docs.avazal.com/guides/messages).

The MCP prompt `prepare_meeting` reads an event and looks up recent mail, chat and documents for each attendee to write a short brief.

## Answer an invite

```bash theme={null}
avazal events.update --id cevt_… --response accepted
```

`response` is `accepted`, `declined` or `tentative`. It is `outward`: the organizer is told.

## Find a free time

```bash theme={null}
curl -X POST https://api.avazal.com/v1/events.find_time \
  -H "Authorization: Bearer $AVAZAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"window": {"start": "2026-12-01T00:00:00Z", "end": "2026-12-08T00:00:00Z"}, "durationMinutes": 30, "attendees": ["dana@example.com"]}'
```

`events.find_time` returns open `slots` that fit your preferences, your calendar and the calendars of attendees Avazal can see. The window can be at most 31 days. Attendees it cannot see come back in `unknownAttendees`, and `rejected` says why other times were left out. Use [`people.list`](https://docs.avazal.com/guides/people) to turn a name into an email address first.

## Book a meeting someone accepted

When someone accepts a time Avazal offered in a reply, the email thread's `draft` carries the acceptance. `events.create` takes that reply draft's `mdrf_…` id as `draft`, adds the meeting to your primary calendar and invites the `attendees`. It is `outward`. It fails with `MeetingUnavailable` when the time is no longer free; set `force` to book it anyway.

`events.get` with the same `mdrf_…` id returns the meeting booked for it: `start` and `end` are `null` until it is on your calendar.

## Preferences and calendars

Scheduling preferences and which calendars Avazal shows live in `settings`, which needs `settings:read` to read and `settings:write` to change:

* `settings.get` returns your `availability`: time zone, working hours, focus blocks, usual meeting length, buffer between meetings and minimum notice. Hours are minutes after midnight in your time zone. Pass `timeZone` to fill it in when none is saved yet. It also returns `calendars.shown`, the ids of the calendars Avazal shows.
* `accounts.list` with `source: "google-calendar"` lists your calendars. Each has `provider.shown` and `provider.primary`.
* `settings.update` with `availability` replaces all your preferences, so read them first and change only what you need. With `calendars` it shows exactly the ids you pass and hides the rest.

`settings.update` needs a person's approval, so it only runs inside an [agent run](https://docs.avazal.com/guides/identities.md#runs) that asked first; a plain API key gets `ToolNotGranted`.

## In MCP

Each operation on this page is an action of one MCP tool. The [tool catalogue](https://docs.avazal.com/mcp-tools.md) lists every tool with its fields.

| Operation | MCP tool |
| - | - |
| `events.list` | `search (type event)` |
| `documents.get` | `read (type document)` |
| `events.get` | `read (type event)` |
| `conversations.get` | `read (type conversation)` |
| `events.update` | `schedule (action update)` |
| `events.find_time` | `schedule (action find_time)` |
| `people.list` | `search (type person)` |
| `events.create` | `schedule (action create)` |
| `settings.get` | `whoami (type settings)` |
| `accounts.list` | `whoami (type accounts)` |
| `settings.update` | `settings (action preferences)` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.