openclaw_logs_tail
Tail recent gateway logs to debug failures in cron jobs, sessions, or agent outputs. Apply client-side filters by log level, time range, or component substring.
Instructions
Tail recent gateway logs. Wraps logs.tail. Read-only. The gateway only forwards limit to the wire; sinceMs, level, and component are applied client-side AFTER fetch (verified live: the gateway rejects them with unexpected property against 2026.4.12+). For wide tails, raise limit and the client filters on the way back. Use this for debug — e.g. tracing why a cron job failed, why a session aborted, or what an agent emitted.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| level | No | Client-side filter on `_meta.logLevelName` (case-insensitive). Common values: 'INFO', 'WARN', 'ERROR'. | |
| limit | No | Forwarded to the gateway. Number of lines to fetch before client-side filtering. | |
| sinceMs | No | Client-side filter: keep entries with `_meta.date` >= sinceMs (epoch ms). | |
| instance | No | Optional OpenClaw instance to route this call to (e.g. 'default', 'work'). Falls back to the active default instance, or the OPENCLAW_GATEWAY_URL/TOKEN env vars when set. List configured instances with openclaw_setup_list. | |
| component | No | Client-side filter: keep entries whose message text contains this substring (case-insensitive). Useful for narrowing to a subsystem (e.g. 'discord', 'cron', 'gateway/ws'). |