Cloudflare Workers MCP server: diff-patch-tools
Call this server's tools from your browser. Nothing to install.
Requests go through mcptry because browsers can't call most MCP servers directly. Header values are sent to the server for that request only and are never stored or logged.
Tool list from our last check. Connect live to refresh it.
Apply a unified diff patch to an original text and return the patched result.
Unified diff patch string
Original text to patch
This tool isn't marked read-only, so it may change something on the server or in an account you connected.
Apply a unified diff patch to an original text and return the patched result.
| Argument | Type | Description |
|---|---|---|
| patch* | string | Unified diff patch string |
| original* | string | Original text to patch |
{
"type": "object",
"required": [
"original",
"patch"
],
"properties": {
"patch": {
"type": "string",
"description": "Unified diff patch string"
},
"original": {
"type": "string",
"description": "Original text to patch"
}
}
}Parse a unified diff string and return line-level statistics: additions, deletions, hunks, files changed.
| Argument | Type | Description |
|---|---|---|
| diff* | string | Unified diff string to analyse |
{
"type": "object",
"required": [
"diff"
],
"properties": {
"diff": {
"type": "string",
"description": "Unified diff string to analyse"
}
}
}Compute a structural diff between two JSON values, showing added, removed, and replaced fields.
| Argument | Type | Description |
|---|---|---|
| modified* | any | Modified JSON value (object, array, or JSON string) |
| original* | any | Original JSON value (object, array, or JSON string) |
{
"type": "object",
"required": [
"original",
"modified"
],
"properties": {
"modified": {
"description": "Modified JSON value (object, array, or JSON string)"
},
"original": {
"description": "Original JSON value (object, array, or JSON string)"
}
}
}Check whether a unified diff patch can be applied cleanly to an original text without actually applying it.
| Argument | Type | Description |
|---|---|---|
| patch* | string | Unified diff patch string |
| original* | string | Original text |
{
"type": "object",
"required": [
"original",
"patch"
],
"properties": {
"patch": {
"type": "string",
"description": "Unified diff patch string"
},
"original": {
"type": "string",
"description": "Original text"
}
}
}Generate a unified diff between two text strings. Ideal for comparing file versions before and after edits.
| Argument | Type | Description |
|---|---|---|
| context | number | Context lines around each change (default 3) |
| modified* | string | Modified text |
| original* | string | Original text |
| modified_file | string | Label for the modified file (default "modified") |
| original_file | string | Label for the original file (default "original") |
{
"type": "object",
"required": [
"original",
"modified"
],
"properties": {
"context": {
"type": "number",
"description": "Context lines around each change (default 3)"
},
"modified": {
"type": "string",
"description": "Modified text"
},
"original": {
"type": "string",
"description": "Original text"
},
"modified_file": {
"type": "string",
"description": "Label for the modified file (default \"modified\")"
},
"original_file": {
"type": "string",
"description": "Label for the original file (default \"original\")"
}
}
}Perform a three-way merge of base, ours, and theirs. Conflicts are marked with standard diff3 conflict markers.
| Argument | Type | Description |
|---|---|---|
| base* | string | Common ancestor text |
| ours* | string | Our version of the text |
| theirs* | string | Their version of the text |
| ours_label | string | Label for ours in conflict markers (default "ours") |
| theirs_label | string | Label for theirs in conflict markers (default "theirs") |
{
"type": "object",
"required": [
"base",
"ours",
"theirs"
],
"properties": {
"base": {
"type": "string",
"description": "Common ancestor text"
},
"ours": {
"type": "string",
"description": "Our version of the text"
},
"theirs": {
"type": "string",
"description": "Their version of the text"
},
"ours_label": {
"type": "string",
"description": "Label for ours in conflict markers (default \"ours\")"
},
"theirs_label": {
"type": "string",
"description": "Label for theirs in conflict markers (default \"theirs\")"
}
}
}