file_compare
Compare two files to identify differences and output detailed comparisons in text or JSON format. Analyze file variations for content changes and statistics.
Instructions
文件差异比较:比较两个文件的差异,以文本或JSON格式输出差异统计和详细对比。
示例:比较两个文件 { "file1": "a.js", "file2": "b.js", "output_format": "json" }
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file1": "<file1>",
"file2": "<file2>"
},
"name": "file_compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file1 | Yes | 第一个比较文件路径 | |
| file2 | Yes | 第二个比较文件路径 | |
| output_format | No | 输出格式:text(纯文本)、json(结构化JSON)、both(两者兼有) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file1 | No | 源文件路径 | |
| file2 | No | 目标文件路径 | |
| identical | No | 文件是否完全相同 | |
| diff_stats | No | 差异统计 |