_get_ui_context
ChatGPTReturns UI enrichment data for widgets. When documentId is provided, returns schema fields, deployed Studio URL, and resolved reference previews. When documentId is omitted, returns project-level context only (Studio URL).
add_cors_origin
ChatGPTAdds CORS origin(s) to allow client-side requests to a Sanity project
assets_upload_status
ChatGPTCheck one to 20 asset uploads using operationIds. Wait at least pollAfterMs between checks and group running uploads in one call. Honor HTTP Retry-After when rate limited. A status lookup error does not mean the upload failed. Results include asset IDs, URLs, and references; set includeMetadata for full metadata. Results are available for up to 24 hours. If an upload outcome is unknown, check the destination before repeating it.
cors_origins_delete
ChatGPTDeletes a CORS origin from a Sanity project
cors_origins_list
ChatGPTLists all CORS origins configured for a Sanity project
create_dataset
ChatGPTCreates a new dataset with specified name and access settings
create_documents
ChatGPTCreate one or more draft documents by directly providing structured content. Creates drafts (drafts.* prefix) unless releaseId is specified for version creation.
create_project
ChatGPTCreates a new Sanity project and initializes it with a dataset and API tokens
create_release
ChatGPTCreate a new release for grouping content changes. Releases are containers that hold versioned documents for coordinated publishing.
create_version
ChatGPTCreate a version document (versions.{releaseId}.* prefix) for a specific release. Versions are separate from drafts and published documents, and are used for scheduled release workflows.
dataset_assets_upload
ChatGPTProvide local Sanity CLI guidance for uploading an image or file asset to a Content Lake dataset. This tool does not read or upload the file.
dataset_assets_upload_from_file
ChatGPTPrepare a one-use URL for uploading an image or file up to 50 MiB to a Content Lake dataset. Works with browser-selected files, readable chat attachments, generated files, and local files. The client needs access to the bytes and HTTP POST capability; no shell or CLI is required. Prepare after the file is available. POST the raw bytes to uploadUrl before uploadExpiresAt. The HTTP response returns the document reference and an asset summary with its ID, type, URL, filename, MIME type, size, title, description, and image dimensions. Set includeMetadata to return the full asset document with all extracted metadata. If the upload response is lost, prepare a new upload URL and resend the same file bytes and upload parameters. For files in ChatGPT web, use dataset_assets_upload_from_web_chatgpt.
dataset_assets_upload_from_url
ChatGPTStart an image or file upload from a public HTTPS URL to a Content Lake dataset. Returns an operationId immediately; use assets_upload_status to retrieve the asset and document field reference. Attach the returned reference with patch_documents, preserving existing field values. Submit uploads individually and check their operation IDs together with assets_upload_status. Honor HTTP Retry-After when rate limited. If a request is interrupted before an operationId is returned, check the destination before repeating the upload. Source size and fetch time limits apply; processing may take several minutes. For a local or private file, use dataset_assets_upload_from_file when available. For files in ChatGPT web, use dataset_assets_upload_from_web_chatgpt.
dataset_assets_upload_from_web_chatgpt
ChatGPTUpload a ChatGPT web attachment or generated file to a Content Lake dataset. Pass the file through ChatGPT web file input; ChatGPT web supplies a temporary download URL that Sanity fetches. Works when the ChatGPT web sandbox cannot make HTTP requests. Choose image or file as assetType. Returns an operationId; use assets_upload_status to retrieve the asset and document field reference. Attach the reference with patch_documents, preserving existing field values. If the download URL expires, pass the file again for a fresh URL and a new requestKey. Check the destination before repeating an upload whose outcome is unknown. Source size and fetch time limits apply; processing may take several minutes.
deploy_schema
ChatGPTDeploy an MCP-managed schema for a workspace. Writes to MCP-managed workspaces and adopts legacy system.schema workspaces into MCP management on first call. Refuses Studio-deployed workspaces. Can add new types or overwrite existing types iteratively. When called on a legacy workspace, the existing types become the baseline; pass an empty schemaDeclaration to adopt the legacy types as-is, or pass new types to add them on top. IMPORTANT: Do not use this tool if a local Sanity Studio project exists. When local Studio files exist, modify them and deploy with npx sanity@latest schema deploy instead — using this tool would cause the deployed schema to diverge from your source. If a Studio-deployed schema already exists at the target workspaceName, this tool refuses. Either update the Studio source and deploy via CLI, or choose a different workspaceName for a new MCP-managed schema.
deploy_studio
ChatGPTDeploy a managed Sanity Studio bound to an MCP-managed schema. Creates a hosted Studio whose URL follows the current environment — sanity.studio on production, studio.sanity.work on staging — and returns the concrete studioUrl in the response. Requires an existing MCP-managed schema at the same (projectId, dataset, workspaceName) address — call deploy_schema first if none exists. Re-run after subsequent deploy_schema calls so the deployed Studio picks up the latest schema.
discard_drafts
ChatGPTDiscard one or more draft documents. If a document is published and has a draft, this removes the draft while leaving the published version intact. Use unpublish_documents before this tool if you want to remove a published document entirely.
get_document
ChatGPTFetch a single document by its exact ID. This is a direct ID lookup only - it does not search, filter, or query. Use when you have a specific document ID and need its full content.
get_project_studios
ChatGPTRetrieves all studio applications linked to a specific Sanity project
get_sanity_rules
ChatGPTLoad Sanity development rules. ALWAYS call list_sanity_rules first to see available rules, then load all rules relevant to your task in a single call.
get_schema
ChatGPTFetch the deployed schema for a workspace. Resolves the best available source automatically — MCP-managed first, then Studio-deployed, then a legacy system.schema document.
give_sanity_feedback
ChatGPTSubmit feedback about Sanity when you encounter issues while working with a Sanity codebase or project. Use this when: - A Sanity MCP tool returned an unexpected error or confusing result - You needed a Sanity capability that doesn't exist or is hard to use - Sanity docs, MCP tool descriptions, or examples were unclear or incorrect - Common Sanity surfaces such as @sanity/client, the HTTP API, schemas, Studio, or deployment were confusing or blocked progress - You had to use a workaround for something in Sanity that should be simpler Provide a specific, detailed message about what you were trying to do, what happened, and what you expected instead.
list_datasets
ChatGPTLists all datasets in your Sanity project
list_embeddings_indices
ChatGPTList all available embeddings indices for a dataset
list_organizations
ChatGPTLists all organizations the user has access to in Sanity
list_projects
ChatGPTLists all Sanity projects associated with your account
list_releases
ChatGPTList releases in a dataset. By default returns active and scheduled releases. Use the state filter to find published or archived releases.
list_sanity_rules
ChatGPTIMPORTANT: Call this FIRST before any Sanity development work. Returns available best practice rules for schemas, queries, frameworks, and visual editing. You MUST load relevant rules before writing Sanity code.
list_workspace_schemas
ChatGPTList the deployed schemas for a project and dataset.
media_assets_upload_from_url
ChatGPTDeprecated. Use media_library_upload_from_url with the same arguments. This tool does not start an upload.
media_library_create_documents
ChatGPTCreate documents in a Media Library. Only sanity.asset.collection can be created — assets themselves come from uploading a binary, which is not supported here. Documents are created directly, not as drafts.
media_library_discard_drafts
ChatGPTDiscard asset drafts, throwing away unpublished metadata edits and leaving the published asset intact.
media_library_get_document
ChatGPTFetch a single Media Library document by its exact ID. This is a direct ID lookup only - it does not search, filter, or query.
media_library_get_schema
ChatGPTGet the document types of a Media Library, or the full field definitions for one type. Call this before querying or editing: the library schema is fixed (assets, collections, folders, aspects), and the organization's own asset aspects are merged onto sanity.asset under aspects.
media_library_link_assets
ChatGPTMake one or more Media Library assets usable in project documents. For image/file assets this creates a local deliverable copy and returns a field value referencing it, plus a weak media global document reference back to the library; for video assets it returns a sanity.video value with global document references only (no local copy). Returns per-asset ready-to-use field values to apply with patch_documents against the target dataset. Each field type must match its asset type. Pairs with media_library_list_asset_references.
media_library_list
ChatGPTLists the Sanity Media Libraries in an organization. Call list_organizations first to get an organization ID. Returns library IDs to pass as mediaLibraryId to the other media_library_* tools.
media_library_list_asset_references
ChatGPTLists documents (across project datasets) that reference a Media Library asset. Use this before replacing an asset to see what depends on it.
media_library_publish_documents
ChatGPTPublish asset drafts to make unpublished metadata edits (title, aspects.*) live, preserving published-only and system-managed fields. The draft is validated against the current aspect definitions first, as the Media Library app does: any error in title or aspects refuses the publish, an aspect whose definition has since been deleted is kept as it stands, and root fields outside the schema are preserved and listed. Only assets have a draft/publish flow. Fails for an asset that has no draft.
media_library_query_documents
ChatGPTQuery a Media Library using GROQ. Assets, collections, folders, and aspect definitions are all queryable. The result count reflects the query result set, not the library total; use a count() query for totals.
media_library_upload_from_file
ChatGPTPrepare a one-use URL to upload a local or private image, video, or file up to 50 MiB to a Media Library, or add a version to an existing asset. Requires access to the file bytes and the ability to make an HTTP POST. Follow the returned upload instructions.
media_library_upload_from_url
ChatGPTStart an image, video, or file upload from a public HTTPS URL to a Media Library. Optionally add a version to an existing asset. Returns an operationId immediately; use assets_upload_status to retrieve the asset, assetInstance, and uploadSession. Submit uploads individually and check their operation IDs together with assets_upload_status. Honor HTTP Retry-After when rate limited. If a request is interrupted before an operationId is returned, check the destination before repeating the upload. Source size and fetch time limits apply; processing may take several minutes. If a duplicate conflict returns error.existingAssetId, follow the error message to inspect the existing asset before retrying. For a local or private file, use media_library_upload_from_file.
patch_documents
ChatGPTUpdate or edit one or more existing documents by applying precise modifications using @sanity/client patch() operations. Patches for each document are applied as a single transaction (all succeed or all fail). Edits are saved to the draft or release version; published content is never modified directly.
publish_documents
ChatGPTPublish one or more draft documents to make them live
query_documents
ChatGPTQuery documents from Sanity using GROQ query language
read_docs
ChatGPTRead a specific Sanity documentation article
run_sanity_cli
ChatGPTRun a limited subset of Sanity CLI commands and return their output. Use --help to list available commands or <command> --help for command details. Commands run without a shell and cannot access the filesystem, prompt for input, run in the background, or change authentication. Dedicated Sanity MCP tools may provide more structured responses, but equivalent CLI commands are also available.
search_docs
ChatGPTSearch Sanity docs
semantic_search
ChatGPTPerform a semantic search on an embeddings index
unpublish_documents
ChatGPTUnpublish one or more published documents (moves them back to drafts), or provide releaseId to mark them for unpublishing when that release runs. Cannot immediately unpublish documents that are referenced by other documents.
update_dataset
ChatGPTModifies a dataset's name or access control settings
version_discard
ChatGPTDiscard one or more document versions from a release
whoami
ChatGPTReturns information about the currently authenticated Sanity user. Useful for verifying authentication and troubleshooting access issues.
add_cors_origin
Claudecreate_dataset
Claudecreate_documents_from_json
Claudecreate_documents_from_markdown
Claudecreate_project
Claudecreate_version
Claudedeploy_schema
Claudediscard_drafts
Claudeget_document
Claudeget_project_studios
Claudeget_sanity_rules
Claudeget_schema
Claudelist_datasets
Claudelist_embeddings_indices
Claudelist_organizations
Claudelist_projects
Claudelist_sanity_rules
Claudelist_workspace_schemas
Claudemigration_guide
Claudepatch_document_from_json
Claudepatch_document_from_markdown
Claudepublish_documents
Claudequery_documents
Clauderead_docs
Claudesearch_docs
Claudesemantic_search
Claudeunpublish_documents
Claudeupdate_dataset
Claudeversion_discard
Claudeversion_replace_document
Claudeversion_unpublish_document
Claude