Get service logs
get_service_logsFetch recent log lines for a specified systemd service on a local or remote host to diagnose issues.
Instructions
Get recent logs for a specific systemd service.
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": {
"service_name": "<service_name>",
"host": "<host>"
},
"name": "get_service_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | Yes | System to run on: 'localhost' for the system the MCP server runs on, or a remote host to connect to via SSH | |
| lines | No | Number of log lines to retrieve. | |
| service_name | Yes | Name of the systemd service |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |