Skip to main content
Let your agents read and write the content of a Sanity project — list datasets, run GROQ queries, fetch documents and past revisions, then create, replace or patch documents.

Connection

  • Authentication: API key (Project API token).
  • Required settings:
    • Project ID — sanity.io/manage → your project → Project ID (8 lowercase letters and digits).
Sign in at sanity.io/manage → select your project → Settings → API → Tokens → Add new token. Name it and pick the Viewer permission for read-only agents, or Editor if they must write; copy the token (it is shown only once). The Project ID is at the top of the project page in sanity.io/manage; your dataset names (e.g. production) are listed under Datasets.See Sanity’s documentation.

Read actions (4)

Write actions (3)

Permissions

Every action above must be explicitly granted to an agent before it can be used. See Permissions for the grant model and Security for how credentials are protected.