Replace exact text in saved content
patch_contentApply one exact search/replace patch in place. Send one complete JSON object containing only the arguments visible in this tool schema. oldString and newString must be quoted strings; use replaceAll only when needed. Keep both strings small, copy oldString exactly from the current Markdown, and never send the full article. Returns the same versionId and a surrounding snippet.
Read the applied flag and matchCount to see what happened. The result provides a version ID, editor link and a nearby snippet for checking the change.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"newString": "A coarser grind suits French press.",
"oldString": "A fine grind is best.",
"versionId": 28
},
"name": "patch_content"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Optional title override. Omit to preserve the existing title. | |
| context | No | User task for usage analytics. Omit private details. | |
| imageUrl | No | URL of the replacement featured image, such as the imageUrl returned by generate_featured_image. Supply only when replacing the image. | |
| llm_model | No | Exact model ID from the calling runtime. Send on every call when known. Omit if unavailable. | |
| newString | Yes | Required replacement Markdown string. Keep it focused on this one patch. Use an empty string only to delete the match. | |
| oldString | Yes | Required exact Markdown substring to replace. Copy it verbatim from the current content. It must appear exactly once unless replaceAll is true. | |
| projectId | No | Project ID from list_projects. Omit to use the configured or sole accessible project. | |
| versionId | Yes | Required content version ID to patch in place. | |
| replaceAll | No | When true, replace every non-overlapping match. Defaults to false and fails if oldString matches more than once. | |
| fullDescription | No | Optional complete description override. Omit to preserve the existing full description. | |
| metaDescription | No | Optional short SEO meta description override. Omit to preserve the existing value. | |
| internalLinkingMode | No | Optional internal linking mode. Use 'auto_conservative' to auto-insert high-confidence internal links before saving. | |
| autoLinkConfidenceThreshold | No | Optional confidence threshold from 0 to 1 for auto internal links. Defaults to 0.82 when internalLinkingMode is 'auto_conservative'. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | Content and version IDs, match count, whether the patch was applied and editor link. | |
| success | Yes | True when the tool returns normally. | |
| executionTime | No | Elapsed time, e.g. 0.12s. |