# Document patching and schema deployment fixes

**Version:** v2.24.0

**Published:** June 17, 2026

## Improvements

- `patch_documents` tool: Renamed from `patch_document` and added support for applying patches to multiple documents in one call.
- `patch_documents` tool: Reworked patching to mirror `@sanity/client` `patch()` operations. It now accepts an array of patches built from `set`, `setIfMissing`, `unset`, `inc`, `dec`, `insert`, and `diffMatchPatch` plus `append` and `prepend` shorthands, with an optional `ifRevisionId` guard. All patches in a single call are applied as one transaction. Edits continue to save to the draft or release version, and editing documents in a release is supported with `releaseId`.
- `create_version` tool: Uses the draft content as the base for new release versions when a draft exists.

## Fixes

- `deploy_schema` tool: Fixed an issue where `deploy_schema` could fail with a duplicate `media` field error after deploying image or file types, which blocked further schema changes for some users. Affected schemas recover automatically on the next deploy.

