get_log_file
Retrieve the last N lines of a log file from a VM, with optional grep filtering applied server-side before transmission.
Instructions
Returns the last N lines of a log file on a VM, with optional grep pattern. Both grep and line-capping execute on the VM before any data is transmitted.
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": {
"vm": "<vm>",
"path": "<path>"
},
"name": "get_log_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vm | Yes | VM name as defined in infra-mcp.yaml | |
| path | Yes | Absolute path to the log file; must be under a configured log_dirs entry | |
| lines | No | Maximum lines to return; server-capped at 200 | |
| pattern | No | Extended regex applied on the VM before transmission (grep -E) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |