trim_diff
Shrinks a git unified diff for reading: collapses lockfile, generated-file, and whitespace-only changes to one line each and cuts surrounding context. The output is not intended for applying.
Instructions
Shrink a git unified diff: lockfiles, generated files and whitespace-only changes collapse to one line each, and context around changes is cut. The result is for reading, not for applying.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "trim_diff"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | File to read, inside the server's root folder. Preferred way to pass input. | |
| text | No | The text itself. Only for small inputs: large text costs tokens to send. | |
| command | No | A command to run and trim (no shell). Only works if started with --allow-run. | |
| context | No | Unchanged lines kept around each change. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |