Tools
This is a reference catalogue. Tools cannot be configured or run from this page.
Cors origins delete
SANITY_MCP_CORS_ORIGINS_DELETEDeletes a CORS origin from a Sanity project
Discard drafts
SANITY_MCP_DISCARD_DRAFTSDiscard 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.
Media library discard drafts
SANITY_MCP_MEDIA_LIBRARY_DISCARD_DRAFTSDiscard asset drafts, throwing away unpublished metadata edits and leaving the published asset intact.
Run sanity cli
SANITY_MCP_RUN_SANITY_CLIRun a limited subset of Sanity CLI commands and return their output. Prefer dedicated Sanity MCP tools when possible, use CLI as a fallback for special cases. 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.
Schema fields patch
SANITY_MCP_SCHEMA_FIELDS_PATCHAdd, replace, or remove top-level fields on one document or object type. Read the type with schema_type_get first and pass its current schemaVersion. Each fieldDeclaration is one JavaScript object literal using deploy_schema syntax. Requires an MCP-managed or Studio-deployed schema descriptor; use deploy_schema to create an MCP-managed schema first. Legacy-only schemas must be migrated before using these tools. Upstream read failures stop the edit and must be retried after recovery. Use a dry run to preview the change before writing. If local Studio files exist, edit those files unless the user explicitly requests remote takeover. Studio takeovers require explicit user confirmation. Blueprint-managed bindings must be updated from their Blueprint source because they do not identify the legacy workspace that MCP must also mirror.
Schema types delete
SANITY_MCP_SCHEMA_TYPES_DELETERemove one or more types from the dataset schema. Read the type with schema_type_get first and pass its current schemaVersion. Types referenced by surviving types cannot be removed. Requires an MCP-managed or Studio-deployed schema descriptor; use deploy_schema to create an MCP-managed schema first. Legacy-only schemas must be migrated before using these tools. Upstream read failures stop the edit and must be retried after recovery. Use a dry run to preview the change before writing. If local Studio files exist, edit those files unless the user explicitly requests remote takeover. Studio takeovers require explicit user confirmation. Blueprint-managed bindings must be updated from their Blueprint source because they do not identify the legacy workspace that MCP must also mirror.
Undeploy schema
SANITY_MCP_UNDEPLOY_SCHEMARemove a legacy MCP-managed schema from an explicitly named workspace. Inspect list_workspace_schemas first and provide an explicit workspaceName. Removes the legacy schema document and MCP ownership record. Datasets with an active Schema API binding cannot be undeployed with this tool yet. Documents and hosted Studios are preserved; a hosted Studio can still contain its own schema snapshot. If a Studio deployed outside MCP shares the workspace name, removes only the MCP ownership record and leaves that Studio schema untouched. Refuses schemas managed outside MCP and provides instructions for their source. Use schema_types_delete to remove individual types instead.
Version discard
SANITY_MCP_VERSION_DISCARDDiscard one or more document versions from a release