get_service_logs
Retrieve recent systemd service logs for troubleshooting on Linux systems, supporting both local execution and remote SSH access to analyze service behavior and diagnose issues.
Instructions
Get recent logs for a specific systemd service.
Args:
service_name: Name of the service
lines: Number of log lines to retrieve (default: 50)
host: Remote host to connect to via SSH (optional, executes locally if not provided)
username: SSH username for remote host (required if host is provided)
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>"
},
"name": "get_service_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| service_name | Yes | ||
| lines | No | ||
| host | No | ||
| username | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |