patch_document
Apply direct patch operations to modify specific parts of a Sanity document, such as setting, unsetting, inserting, incrementing, or decrementing values at specified paths.
Instructions
Apply direct patch operations to modify specific parts of a document without using AI generation
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"documentId": "<documentId>",
"operations": "<operations>"
},
"name": "patch_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| releaseId | No | Optional release ID for patching versioned documents. If provided, the document in the specified release will be patched. | |
| documentId | Yes | The ID of the document to patch | |
| operations | Yes | Array of patch operations to apply |