---
name: "chattels"
description: "Use Chattels — the home inventory API for AI agents — to answer 'do I own this?', 'where is it?', and 'who borrowed it?' via REST or MCP."
---

# Chattels

Chattels is the home inventory API for AI agents. It tracks what the user owns —
books, board games, CDs, video games, tools, outdoor recreation, spices, jewelry,
and custom kinds they define — where each item lives, and who borrowed it.

## Base URL

`https://agentchattels.io`

## Auth

- Every request carries the API key: `Authorization: Bearer <key>`
- Keys are minted by the account holder on the Chattels API keys page; the
  secret is shown exactly once when the key is created, and keys can be revoked
  at any time.
- Every key carries a subset of five scopes (see below); a key used without its
  required scope gets `403 {error: "insufficient_scope"}`. Scopes are checked
  literally — holding one never implies another.

### Scopes

| Scope | Allows |
|---|---|
| `inventory:read` | Search, list, and inspect inventory (works, copies, locations, loans) |
| `inventory:write` | Add, edit, and delete works, copies, and locations |
| `loans:write` | Check items out to people and back in |
| `keys:manage` | Create, list, update, and revoke other API keys (hand out only when you mean it) |
| `sharing:manage` | Mint/list/revoke invites (`/api/invites`) and manage library grants (`/api/grants`) |

## Quickstart

```bash
export CHATTELS_KEY="..."   # set from the key the account holder gave you

# Do I own it? (free-text search, top 50)
curl -H "Authorization: Bearer $CHATTELS_KEY" \
  "https://agentchattels.io/api/works/search?q=dune"

# List a kind, paginated (default 20/page)
curl -H "Authorization: Bearer $CHATTELS_KEY" \
  "https://agentchattels.io/api/works?kind=board_game&page=1&per_page=20"

# Add it (kind + title are required)
curl -X POST -H "Authorization: Bearer $CHATTELS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"kind":"board_game","title":"Dune","creators":["Gale Force Nine"],"year":2019}' \
  "https://agentchattels.io/api/works"
```

Machine-readable reference: `https://agentchattels.io/api/openapi.json` (single source of truth).

## Endpoint summary

- **Works** — `GET /api/works` (paginated; filter by `kind`, `genre`, `platform`), `GET /api/works/search` (free-text, uncapped search returning up to 50), `POST /api/works`, `GET /api/works/{id}`, `PATCH /api/works/{id}`, `DELETE /api/works/{id}`
- **Copies** — `POST /api/copies` (format, condition, location), `GET /api/copies/{id}`, `PATCH /api/copies/{id}`. One work can have many copies; each has its own owner, location, and status.
- **Locations** — `GET /api/locations`, `POST /api/locations` (nested trees, e.g. "Home › Library › Shelf 3")
- **Loans** — `POST /api/loans/checkout`, `POST /api/loans/{id}/checkin`, `GET /api/loans`
- **Loan requests** — `GET /api/loan-requests`, `POST`, plus approve / decline / cancel
- **Sharing** — `GET /api/grants`, `POST /api/grants` (per-kind grants), revoke
- **Invites** — `GET /api/invites`, `POST /api/invites` (household co-manager invites)

Work kinds: `book`, `board_game`, `cd`, `video_game`, `tool`, `outdoor_recreation`, `spice`, `jewelry` — plus custom kinds defined per account (see `GET /api/custom-kinds`).

Writes are idempotent via an `Idempotency-Key` header where supported. Creating an
already-owned work with an exact identifier returns `409 {error: "duplicate"}` with
`duplicate_of: {id, title}` — link to the existing work instead of re-creating.

## Libraries shared with you (grantee)

Items someone shared with you do **not** appear in your own inventory
endpoints — they live under the shared endpoints, keyed by grant:

1. `GET /api/grants` — look at the `received` array for grants issued to you
   (grant id, owner, and which kinds are shared).
2. `GET /api/shared/works?grant_id=<id>` — browse the shared items. Supports
   `kind`, `q`, `page`, `per_page`; each work includes its copies (so you can
   see which copies are `available`), and the owner's private notes are
   stripped. Requires the `inventory:read` scope.
3. `POST /api/loan-requests` with `{"grant_id": <id>, "copy_id": <id>}`
   (optional `due_at`, `notes`) — request to borrow an available copy.
   Requires the `loans:write` scope. The owner approves or declines; watch
   `GET /api/loan-requests` for the outcome.

Troubleshooting: a `404` from `/api/shared/works` means the grant id is wrong,
revoked, or belongs to someone else. A `403 insufficient_scope` names the
missing scope — ask the account holder to mint a key that includes it.

## MCP

Streamable HTTP MCP at `https://agentchattels.io/mcp` — **POST only** (GET/DELETE are
rejected). JSON-RPC 2.0: `tools/list`, `tools/call` (e.g. `search_works`,
`list_works`, `get_work`, `create_work`, `fast_add_work`, `create_location`,
`list_locations`, `list_loans`, `lookup_metadata`, `get_stats`, `import_csv`).
Same `Authorization: Bearer` header; each tool additionally requires its own scope
(e.g. `create_work` needs `inventory:write`).

## Operating rules

- Never print, log, or store raw API keys. Never ask the user to paste a key into
  chat — the account holder hands keys to agents through their own secure channel.
- Treat 401/403 as a request problem first: check the key and its scopes before
  assuming the service is down. A `403 insufficient_scope` means the key lacks a
  required scope — say which scope is needed so the account holder can mint a new key.
- Default `per_page` is 20; page through `GET /api/works` when scanning inventory
  rather than pulling everything at once.
- Signup is open: if the user has no account, they can register at
  https://agentchattels.io/#signup — no invite needed. A household invite
  code is only for joining an existing member's household as a co-manager.
- The agent-facing docs live at `https://agentchattels.io/agents`.
