Skip to content

merge_three_way

MCP tools › Code insight and refactoring

Three-way merge of texts (base, ours, theirs) as a merge editor sees it: chunks (stable, ours, theirs, both, conflict) with their lines, the number of conflicts and the merged text with Git-style conflict markers (style merge or diff3).

Its results carry text from files: the client is told to treat that as data, never as instructions.

Capabilitycode.merge_three_way
AreaCode insight and refactoring
Accessreads only
Reaches—
Rightsnone
Dry runnone

Arguments

ArgumentTypeDescription
baserequiredstringCommon ancestor text.
oursrequiredstringOur version.
theirsrequiredstringTheir version.
stylestringMarker style: merge (default) or diff3.
labelsarray of stringLabels after the markers: ours, base, theirs (default ours, base, theirs).minItems 3 · maxItems 3
resolve_simplebooleanResolve simple conflicts word by word before writing the text (default false).

Call it from a shell

ferris-idea call runs one tool with the rights and safe mode of ferris-idea mcp. Replace the folder and the placeholder values.

Terminal window
ferris-idea call ~/my-project merge_three_way '{"base":"<string>","ours":"<string>","theirs":"<string>"}'
Input schema as JSON
{
"type": "object",
"required": [
"base",
"ours",
"theirs"
],
"properties": {
"base": {
"description": "Common ancestor text.",
"type": "string"
},
"ours": {
"description": "Our version.",
"type": "string"
},
"theirs": {
"description": "Their version.",
"type": "string"
},
"style": {
"description": "Marker style: `merge` (default) or `diff3`.",
"type": [
"string",
"null"
]
},
"labels": {
"description": "Labels after the markers: ours, base, theirs (default `ours`, `base`, `theirs`).",
"type": [
"array",
"null"
],
"items": {
"type": "string"
},
"minItems": 3,
"maxItems": 3
},
"resolve_simple": {
"description": "Resolve simple conflicts word by word before writing the text (default false).",
"type": [
"boolean",
"null"
],
"default": null
}
}
}