Weavz
Sanity

Sanity

Headless CMS and structured content platform

6 tools
Use withChatGPTClaudeClaude CodeCursorCodexMCP clientsSetup guide

Tools

Name
query

Run a GROQ query against a Sanity dataset with optional parameters.

get_document

Fetch a Sanity document by ID.

list_documents_by_type

List recent documents of a Sanity document type.

create_document

Create a Sanity document. The document is not published separately; Sanity document visibility depends on the ID and dataset rules.

update_document

Patch fields on an existing Sanity document.

delete_document

Delete a Sanity document. Requires explicit confirmation.

Quick Start

TypeScript
import { WeavzClient } from '@weavz-io/sdk'

const weavz = new WeavzClient({ apiKey: 'wvz_...' })

const result = await weavz.actions.execute('sanity', 'query', {
  workspaceId: '550e8400-e29b-41d4-a716-446655440000',
  integrationAlias: 'sanity',
  input: { /* ... */ },
})

Related Integrations

Works well with

Frequently Asked Questions

How do I connect Sanity to my app?

Use Weavz Hosted Connect for Custom authentication. Install the SDK, create a connection through the connect portal or API, then execute tools programmatically.

What tools does Sanity support?

Sanity supports 6 tools including Query Documents (GROQ), Get Document, List Documents by Type, Create Document, Update Document, and more.

Can I use Sanity with AI agents?

Yes. Add Sanity to an MCP server in Tool Mode or Code Mode. Code Mode provides 3 meta-tools with on-demand API discovery so agents can compose stateful workflows without loading every action schema up front.

How do I connect Sanity to ChatGPT or Claude?

Open the Weavz connector setup, sign in, choose a workspace, and add Sanity as an approved app. ChatGPT, Claude, and other remote MCP clients can then call the scoped Sanity tools exposed by that workspace.

Does Sanity work with Claude Code, Cursor, Codex, and local agents?

Yes. Remote and local MCP clients can connect to a Weavz MCP endpoint for the workspace. Local coding agents can also use the Weavz CLI to inspect apps, discover actions, run approved Sanity work, and execute Code Mode workflows from a terminal.

What can I ask an AI agent to do with Sanity?

Sanity exposes 6 tools, including Query Documents (GROQ), Get Document, List Documents by Type, Create Document, Update Document, and more. Use Weavz to keep credentials scoped, require approval for sensitive work, and audit what the agent did.

Can Sanity be used in stateful agent workflows?

Yes. Agents can combine Sanity tools with Filesystem, State KV, Human Gates, input partials, and other workspace integrations while keeping execution scoped to the selected workspace or end user.

What authentication does Sanity use?

Sanity uses Custom. Weavz stores credentials securely and uses them for authorized action execution.

How much does the Sanity integration cost?

The Sanity integration is included on all Weavz plans including the free tier with 20,000 actions per month. No credit card required.

Connect Sanity in minutes

Get 20,000 free action executions every month. No credit card required.