Connect Sanity to your AI agent

Developer Tools 21 actions available

Sanity is a headless CMS platform that provides structured content storage and APIs for modern applications

We set up the connection using your own Sanity account, with keys you control, and keep it running. Your agent picks it up and starts doing the work.

What your agent can do in Sanity

Each one is a real action the agent can take on its own, the same things a person clicking around Sanity could do. Read-only by default; write actions are confirmed against your policy.

  • Add Default Role to Users Apply organization default role to all users. Use when you need to assign the organization's default role to all existing users in the organization. Requires the resource ID of the organization.
  • Create Attribute Definition Tool to create a new user attribute definition in Sanity. Use when you need to define a custom attribute (like 'customer-tier' or 'subscription-level') that can be attached to resources. The key must be unique within th…
  • Create Prompt Post Send a one-shot prompt to the Sanity Content Agent. Stateless one-shot prompt endpoint. No thread management or message persistence. Ideal for simple, single-turn interactions. Use when you need to send a single prompt…
  • Delete User Attribute Definition Delete a user attribute definition. Use when you need to remove a custom attribute definition from an organization or project in Sanity. The attribute definition controls how user attributes are structured and validated…
  • Delete Document Delete a document from Sanity by ID or query. This action is irreversible when purge is true — the document cannot be recovered once permanently deleted. Use when you need to remove a specific document by ID or bulk del…
  • Delete User Attributes Delete custom attributes from a Sanity user within an organization. Use this tool when you need to remove specific custom attributes from a user account. The action deletes the attributes specified in the request and re…
  • Get Document by ID Fetch a single document by its ID from Sanity. Use this action when you need to retrieve a specific document using its unique identifier rather than running a GROQ query. Returns the complete document with all system fi…
  • Get Invite By Token Retrieve an invite by its public token. Use this action when you need to fetch details about an invite using the invite token that was shared with the invitee. Returns invite information including status, role, and invi…
  • Get Organization Role Retrieve a specific organization role by its ID. Use this action when you need to fetch details about an organization role including its permissions, title, description, and whether it applies to users or robots. The ro…
  • Get Permission Get a permission for a specific resource. Use when you need to retrieve details about a particular permission including its actions, parameters, and scope. The action retrieves permission information based on the resour…
  • Get Project Retrieve full details for a specific Sanity project by its ID. Returns comprehensive project information including display name, organization, studio host, and timestamps. Use this action when you need to fetch complete…
  • Get Robots Tool to get robots with access to a resource. Use when you need to retrieve a list of robots (service accounts) that have been granted access to a specific resource along with their assigned roles. This action supports…
  • Get Role Retrieve a specific role for a given resource type and resource ID. Use this action when you need to fetch details about a role including its permissions, title, description, and whether it applies to users or robots. T…
  • List Resource Users List all users of a resource and their assigned roles. Use when you need to retrieve user information and role assignments for a specific project or organization. Supports pagination via cursor.
  • List Organization Roles List all roles available for an organization. Use this action to retrieve all available roles that can be assigned to users within a specific Sanity organization. The organization_id is required to identify which organi…
  • List User Attributes Tool to retrieve user attributes from a Sanity organization. Use when you need to get the attributes (such as roles, permissions, or custom properties) associated with a specific user in a Sanity organization. Supports…
  • Query All Screening Execute a GROQ query to fetch all screening documents from Sanity. Uses the Sanity HTTP query API endpoint. Default query retrieves all documents of type 'screening'. Supports optional query parameters for dynamic queri…
  • Query Documents Execute an arbitrary GROQ query against a Sanity dataset. GROQ is Sanity's query language for fetching and transforming content. This is a general-purpose query action distinct from any screening-specific tools. Use thi…
  • Update Organization ACL Tool to assign a role to a member in a Sanity organization. Use when adding or modifying user roles within an organization.
  • Update User Attributes Values Update user attribute values for a resource. Use this action to set or update custom attributes for a user within an organization or project. When setting a value for an attribute key that also exists in SAML, the Sanit…
  • Validate Credential Validate Sanity API credentials by fetching the authenticated user's information. Use this action when you need to verify that an API token is valid and has proper authentication. This action returns user information an…

How we connect it

  1. 1

    Connect your account

    You create a key in Sanity, a key you create and control, and paste it in once. It lives in a secrets store on your server, not with us.

  2. 2

    Set the guardrails

    Read-only by default. You choose which write actions the agent may take, and anything outside that policy gets confirmed with you first.

  3. 3

    We keep it running

    Health checks on every connection, updates handled for you, and we watch the first week of activity to make sure the work lands.

Sanity questions, answered.

With a key you create and control. You paste it in once, it is stored in a secrets store on your server, permissions are scoped to the minimum the agent needs, and you can revoke it at any time.
The actions Sanity's API allows, the same things a person clicking around the app could do. Connections start read-only by default; write actions are confirmed against the policy you set before the agent takes them.
Connections are priced per tool on top of the base plan. Some are included, some are premium. See pricing for how connection charges work.
Standard tools are ready inside 7 business days of the setup call. We test the connection end to end, walk you through how the agent uses it, and watch the first week of activity.

Ready to put Sanity to work?

Tell us what your team runs on. We set up the connection, secure it, and your agent takes it from there.

All product names, logos, and brands are property of their respective owners; used for identification only. ZeroToClaw is not affiliated with or endorsed by Sanity.