compare_files
Compare two files to highlight differences using multiple formats like unified, side-by-side, inline, or context. Configure context lines, ignore whitespace, and enable word-level comparisons for precise analysis.
Instructions
Compare two files and show differences with multiple format options
Input Schema
Name | Required | Description | Default |
---|---|---|---|
contextLines | No | Number of context lines (default: 3) | |
file1 | Yes | First file path | |
file2 | Yes | Second file path | |
format | No | Diff format | |
ignoreWhitespace | No | Ignore whitespace changes | |
label1 | No | Label for first file | |
label2 | No | Label for second file | |
wordDiff | No | Show word-level differences |
Input Schema (JSON Schema)
{
"properties": {
"contextLines": {
"description": "Number of context lines (default: 3)",
"type": "number"
},
"file1": {
"description": "First file path",
"type": "string"
},
"file2": {
"description": "Second file path",
"type": "string"
},
"format": {
"description": "Diff format",
"enum": [
"unified",
"side-by-side",
"inline",
"context"
],
"type": "string"
},
"ignoreWhitespace": {
"description": "Ignore whitespace changes",
"type": "boolean"
},
"label1": {
"description": "Label for first file",
"type": "string"
},
"label2": {
"description": "Label for second file",
"type": "string"
},
"wordDiff": {
"description": "Show word-level differences",
"type": "boolean"
}
},
"required": [
"file1",
"file2"
],
"type": "object"
}