patch_document
Apply targeted find/replace edits to markdown documents without rewriting entire content. Use for efficient updates to large documents in mdshare's collaboration platform.
Instructions
Apply find/replace operations to a document without rewriting the full content. More efficient than update_document for small edits to large documents. Each find string must be unique unless replace_all is set. If the document is in this MCP server's local store, 'key' is optional. PREFER file_path over operations for batches of operations stored in a JSON file on disk — bypasses inline transmission. If both file_path and operations are provided, file_path wins.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| document_id | Yes | Document ID | |
| key | No | Edit or admin key. Optional if the document is in this MCP server's local store. | |
| file_path | No | Absolute path to a local JSON file containing an array of {find, replace, replace_all?} operations. PREFERRED when the operations are already prepared on disk. | |
| operations | No | Find/replace operations to apply sequentially. Use file_path instead for operations stored on disk. | |
| author | No | Your name (for edit attribution) |