service_logs
Retrieve recent service logs from OpenWrt or systemd routers by specifying the service name and optional line count, returning the tail output.
Instructions
读取服务日志尾部内容(OpenWrt 走 logread,systemd 走 journalctl)。
参数: name: 服务名 lines: 返回行数,1 <= lines <= ROUTER_MCP_MAX_LOG_LINES(默认 500)
返回结构: {"ok": true, "data": {"name", "requested_lines", "returned_lines", "source", "command", "truncated", "lines": [...] }}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| lines | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |