# Caesura for agents

> How to act on Caesura, a collaborative trip planner, for the person who sent you.

You act as that person and can do no more than they can. Everything below is about doing it well and without surprises.

## Signing in

Pick the way that fits how you were given access.

- **A scoped token.** A person mints it in Account → Security → API tokens → New token (Premium) and gives you the secret, which is shown once. Send it as `Authorization: Bearer tc_...` on every request. It holds only the scopes it was given.
- **OAuth through the MCP server.** Connect an MCP client to `https://caesura.today/api/mcp`; it signs the person in with OAuth 2.1 and shows them what you may do. Discovery is at `/.well-known/oauth-protected-resource/api/mcp`.
- **Poppy.** If you carry a Personal Agent Session, start from `https://caesura.today/.well-known/poppy.json`.

## Which surface fits which job

- **MCP tools** (`https://caesura.today/api/mcp`): the best fit when you are an assistant in a chat: a short list of tools, each already described for a model.
- **The REST API** (`https://caesura.today/api/v1`): the best fit for a script or a program. Every endpoint, its scope, request and response is in the [OpenAPI document](https://caesura.today/api/v1/openapi); [the reference](https://caesura.today/developers/reference) renders it for a person.
- **The API catalog** (`https://caesura.today/.well-known/api-catalog`): where to start when you were handed only the host.
- **`https://caesura.today/llms.txt`**: what Caesura is, in a page.
- **[Security](https://caesura.today/security)**: how a person signs in, takes access back from you, and reports a vulnerability.

## Scopes

Ask for the narrowest set that does the task.

- `trips:read` — Read trips. See your trips, their days and stops, costs, history, and existing share links. Reading or listing your trips needs this scope, though current:read also reads the trips under way now or starting within three days; without either, your trips stay hidden, though public Discover playbooks can still be browsed.
- `trips:write` — Change trips. Create, change and delete trips, days and stops; undo, redo and revert. Creating or changing a trip needs this scope, though current:write also changes the days and stops of a trip under way now or starting within three days; without either, trips can only be read.
- `notebook:read` — Read the Notebook. Read the Notebook pages on a trip. Opening a Notebook page needs this scope, though current:read also opens the pages on a trip under way now or starting within three days; without either, trip tasks still work but Notebook content stays hidden.
- `notebook:write` — Write the Notebook. Create, change and delete the Notebook pages on a trip. Writing a Notebook page needs this scope; without it, Notebook pages can only be read.
- `library:read` — Read your library. Read your saved-days library and your Playbooks (a Playbook is a view over saved days), and browse published Playbooks. Reading your saved days or your Playbooks needs this scope or current:read; without either, trip tasks still work, and only published Playbooks can be browsed.
- `library:write` — Change your library. Create, edit, import and delete saved days and Playbooks, and publish or unpublish them to Discover. Changing the library needs this scope; without it, saved days and Playbooks can only be read.
- `sharing:write` — Invite and share. Invite people to a trip and revoke invites, and create or revoke share links. Inviting someone or sharing a trip needs this scope; without it, trips can be managed but not shared.
- `account:read` — Read your account. See who you are and what plan you hold. Checking your account or plan needs this scope or current:read; without either, trip and library tasks still work.
- `places:read` — Search places. Look up real places by name, outside any trip. Every search counts against your daily geocoding allowance (the one the app's own place search uses) and a daily budget shared by every account; one token may make at most 100 a day. Finding a place by name outside a trip needs this scope, while a trip's own place search takes trips:write instead; without either, stops can still be added with coordinates, but not found by name.
- `current:read` — Read current trips. See the trips under way now or starting within three days, with their days and stops, costs, history and share links, and the Notebook pages on those trips, plus your saved-days library, Playbooks and account. Reading a current trip needs this scope or trips:read; without either, your trips stay hidden, though public Discover playbooks can still be browsed.
- `current:write` — Change current trips. Change the days and stops of the trips under way now or starting within three days, and undo, redo or revert those changes. Those changes need this scope or trips:write, while editing the trip itself (its name, dates or cover, or deleting or restoring it) still needs trips:write; without either, current trips can only be read.

## Limits

- 1000 requests per hour for each token or OAuth connection (an OAuth connection keeps one allowance across its refreshed access tokens). Past it you get HTTP 429 with a `Retry-After` header: wait that many seconds.
- A Poppy session that is not signed in has its own, separate read limits; the same 429 and `Retry-After` apply.
- 100 place searches per day for each token or OAuth connection (`search_places`, `GET /api/v1/geocode`). Search once per place.
- Some writes that create something accept an `Idempotency-Key` header, so a retry after a timeout does not make a second one.

## MCP tools

| Tool | What it does | Scope |
|---|---|---|
| `whoami` | Show which Caesura account this connection acts as: its user id, plan and entitlements. | `account:read` or `current:read` |
| `search_places` | Search for a real place by name and get up to five locations, each ready to use as a stop's `location`. | `places:read` |
| `search_library_cities` | Find city names in the published Playbook library by prefix, with how many published days touch each. | `trips:read` |
| `list_discover_playbooks` | List published Playbooks from everyone, filtered by city, country, length or rating. | `library:read` or `current:read` |
| `list_my_playbooks` | List the Playbooks this account has made or kept, newest first, optionally only public or private ones. | `library:read` or `current:read` |
| `get_playbook` | Read one Playbook (yours, or anyone's published one) with every day and stop in order. | `library:read` or `current:read` |
| `create_playbook` | Create a private Playbook, written inline as days of stops, or kept from days of one of your trips. | `library:write` |
| `update_playbook` | Change one of your Playbooks: its name, its summary (null clears it), or all of its days at once. | `library:write` |
| `publish_playbook` | Publish one of your Playbooks to Discover, where anyone can find, read and review it. | `library:write` |
| `unpublish_playbook` | Take one of your published Playbooks out of Discover; it stays yours, private. | `library:write` |
| `set_playbook_cover` | Set the cover photo of one of your Playbooks, replacing any it had. | `library:write` |
| `move_playbook_cover` | Move where the cover photo of one of your Playbooks is framed, without changing the photo. | `library:write` |
| `list_trips` | List the trips this account owns or is a member of, optionally only those under way today. | `trips:read` or `current:read` |
| `get_trip` | Read one trip with its days, stops, members and conflicts. | `trips:read` or `current:read` |
| `set_trip_cover` | Set the cover photo of a trip you can edit, replacing any it had. | `trips:write` |
| `move_trip_cover` | Move where the cover photo of a trip you can edit is framed, without changing the photo. | `trips:write` |
| `list_notebook_pages` | List the Notebook pages (research notes, packing lists and the like) on one of your trips. | `notebook:read` or `current:read` |
| `get_notebook_page` | Read one Notebook page on a trip. | `notebook:read` or `current:read` |
| `update_notebook_page` | Change a Notebook page on a trip you can edit. | `notebook:write` |

## What never to do

- **Never publish, delete or invite without asking the person first.** Say what you are about to do, to what, and wait for a yes. Publishing puts a Playbook in front of everyone; an invite or a share link puts a trip in front of someone else.
- **Never ask for more scope than the task needs.** If a read is enough, do not request the write scope.
- **Never overwrite what you have not read.** Before changing a Playbook, read it and send the version you read back as `expectedVersion`; if it is refused as stale, read again rather than forcing it. A notebook page has no version check, so read it first and send only the fields you mean to change.
- **Never retry in a loop.** On a 429, wait for `Retry-After`; on a 4xx, change the request.
- **Never store or repeat the person's token.** Do not put it in a trip, a Playbook or a message.
