Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
SANITY_TOKENNoAPI token (required for writes)
SANITY_DATASETNoDataset nameproduction
SANITY_PROJECT_IDYesYour Sanity project ID
SANITY_API_VERSIONNoAPI version2024-01-20

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
sanity_queryB

Execute a GROQ query against Sanity CMS. GROQ is a query language similar to GraphQL but designed for JSON documents. Examples: *[_type == "post"] gets all posts, *[_type == "post" && slug.current == "my-post"][0] gets a specific post.

sanity_get_documentB

Get a single Sanity document by its ID

sanity_list_documentsA

List documents of a specific type with pagination

sanity_searchB

Search for documents using full-text search across titles, names, descriptions, and body content

sanity_get_typesA

Get all document types in the Sanity dataset

sanity_get_type_infoA

Get information about a document type including field names and document count

sanity_countB

Count documents matching a GROQ filter

sanity_createB

Create a new document in Sanity CMS. Requires write token.

sanity_updateA

Replace an entire document. Requires write token.

sanity_patchC

Partially update a document. Requires write token.

sanity_deleteB

Delete a document. Requires write token.

sanity_publishA

Publish a draft document (moves from drafts.* to published). Requires write token.

sanity_unpublishA

Unpublish a document (moves to drafts.*). Requires write token.

sanity_referencesA

Find all documents that reference a given document. Essential before deleting to avoid broken references.

sanity_historyB

Get the revision history of a document. See who changed what and when.

sanity_diffA

Compare two documents and see what fields differ. Useful for comparing draft vs published or two versions.

sanity_bulkA

Execute multiple operations in a single atomic transaction. All succeed or all fail together.

sanity_draft_statusA

Check if a document has unpublished changes. Shows both draft and published versions if they exist.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Purple-Horizons/sanity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server