Get service logs
spm_get_logsRead recent log lines from managed services to verify clean startup, diagnose crashes or restarts, and inspect output such as URLs, ports, and errors.
Instructions
Read recent log lines from one or more managed services. Use it to check that a service started cleanly, to find why it crashed or keeps restarting, or to read its output such as URLs, ports and errors; use spm_doctor instead when spm itself or the service manager seems broken. Returns at most lines entries (default 100) as text; with several names, their entries are combined. Set health=true to read health-check output instead of service output. It never follows logs, so call it again to see newer lines. Acts on the current user's services unless system is true; machine-wide services need root on Linux and macOS or an Administrator shell on Windows, so only use system when the user asks for it.
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": "spm_get_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grep | No | Only return lines matching this pattern, for example error. | |
| lines | No | Maximum number of log lines to return. | |
| names | No | Service names to read. Omit to read logs for all managed services in the scope. | |
| since | No | Only return entries newer than this: a relative time such as 10m or 1h, or a date such as 2026-01-01. | |
| health | No | Read health-check logs instead of the service's own output. | |
| system | No | Manage machine-wide services instead of the current user's. Requires root or Administrator; leave false unless the user asks for system scope. |