Get Workload Logs
get_workload_logsQuery workload logs from a GVC. Provide structured params (gvc, workload, container, location, filter) OR a raw LogQL query — a raw query REPLACES the structured params, so it must embed ALL labels itself. Available labels: gvc, workload, container, location, provider, replica, stream — replica and stream are only reachable via a raw query. filter is a literal substring match (|=), not regex; for regex use a raw query with |~. Cron workload? Get jobExecutions via list_deployments (with location), then re-query with a raw query scoping replica= plus the execution's time window — embed gvc/workload/location labels in the raw query. Returns structured JSON with timestamps, messages, and labels. Recommended reading before first use: get_cpln_skill("workload-troubleshooting") — the runbook for this tool family (read once per session).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Absolute end time (exclusive, ISO 8601). | |
| gvc | No | GVC name. Required unless raw `query` is provided. | |
| org | Yes | Organization slug (lowercase kebab-case). NEVER guess — if the user has not named one, ask. On org-not-found, stop and ask; do not retry variants. | |
| from | No | Absolute start time (inclusive, ISO 8601). Overrides `since`. Must be earlier than `to`. | |
| limit | No | Maximum log entries to return (default: 30, max: 999). | |
| order | No | Sort order (default: "oldest_first"). | |
| query | No | Raw LogQL query. REPLACES the structured params entirely, so it must embed ALL labels itself (gvc, workload, location, …) — required for the replica/stream labels, which have no structured param. Not sanitized — use structured params when possible. | |
| since | No | Lookback window as relative duration (default: "1h"). Examples: "30m", "2h", "1d". | |
| filter | No | Literal substring filter (LogQL `|=`) — only return log lines containing this exact text. NOT a regex; for regex matching use a raw `query` with `|~`. | |
| location | No | Location to filter logs for (e.g., "aws-us-east-1"). | |
| workload | No | Workload name to filter logs for. | |
| container | No | Container name to filter logs for (e.g., "main", "_accesslog"). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the call succeeded. | |
| data | No | The full machine-readable result — list rows, the resource object, query results. Read THIS, not just the summary. | |
| summary | Yes | One-line summary of the result. | |
| nextSteps | No | Recommended follow-up actions for this task, in order. |