trim_log
Collapse repeated log lines while keeping key error lines, head content, and final stack frames so you can inspect large logs without reading every line.
Instructions
Shrink a log or stack trace: repeated lines collapse, long tracebacks keep their last frames, every distinct error line stays. Use it instead of reading a whole log.
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_log"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| head | No | First lines always kept. | |
| path | No | File to read, inside the server's root folder. Preferred way to pass input. | |
| tail | No | Last lines always kept. | |
| 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. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |