|
| 1 | +--- |
| 2 | +title: Logs |
| 3 | +description: Query workflow runs and fetch run details |
| 4 | +--- |
| 5 | + |
| 6 | +import { BlockInfoCard } from "@/components/ui/block-info-card" |
| 7 | + |
| 8 | +<BlockInfoCard |
| 9 | + type="logs_v2" |
| 10 | + color="#EAB308" |
| 11 | +/> |
| 12 | + |
| 13 | +## Usage Instructions |
| 14 | + |
| 15 | +Query workflow run logs in the current workspace with the same filters as the Logs page, returning matching run IDs. Fetch full details for a single run, including its trace spans. |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | +## Actions |
| 20 | + |
| 21 | +### `logs_query_runs` |
| 22 | + |
| 23 | +Query workflow run logs in the current workspace with the full Logs-page filter set. Returns matching run IDs. |
| 24 | + |
| 25 | +#### Input |
| 26 | + |
| 27 | +| Parameter | Type | Required | Description | |
| 28 | +| --------- | ---- | -------- | ----------- | |
| 29 | +| `workflowIds` | string | No | Comma-separated workflow IDs to filter by | |
| 30 | +| `folderIds` | string | No | Comma-separated folder IDs to filter by \(descendants included\) | |
| 31 | +| `level` | string | No | Comma-separated statuses: 'info', 'error', 'running', 'pending', 'cancelled'. Omit for all. | |
| 32 | +| `triggers` | string | No | Comma-separated trigger types \(api, webhook, schedule, manual, chat, mcp, a2a, workflow, sim, …\) | |
| 33 | +| `startDate` | string | No | ISO 8601 timestamp; only runs at or after this time | |
| 34 | +| `endDate` | string | No | ISO 8601 timestamp; only runs at or before this time | |
| 35 | +| `search` | string | No | Free-text search across log fields | |
| 36 | +| `costOperator` | string | No | Cost comparison operator: '=', '>', '<', '>=', '<=', '!=' | |
| 37 | +| `costValue` | number | No | Cost threshold in credits, compared using costOperator | |
| 38 | +| `durationOperator` | string | No | Duration comparison operator: '=', '>', '<', '>=', '<=', '!=' | |
| 39 | +| `durationValue` | number | No | Duration threshold in milliseconds, compared using durationOperator | |
| 40 | +| `limit` | number | No | Max run IDs to return \(default 100, max 200\) | |
| 41 | +| `sortBy` | string | No | Sort field: 'date' \(default\), 'duration', 'cost', 'status' | |
| 42 | +| `sortOrder` | string | No | Sort order: 'desc' \(default\) or 'asc' | |
| 43 | + |
| 44 | +#### Output |
| 45 | + |
| 46 | +| Parameter | Type | Description | |
| 47 | +| --------- | ---- | ----------- | |
| 48 | +| `runIds` | array | IDs of the runs matching the filters | |
| 49 | + |
| 50 | +### `logs_get_run_details` |
| 51 | + |
| 52 | +Fetch details for a single workflow run by its run ID, including the full trace spans. |
| 53 | + |
| 54 | +#### Input |
| 55 | + |
| 56 | +| Parameter | Type | Required | Description | |
| 57 | +| --------- | ---- | -------- | ----------- | |
| 58 | +| `runId` | string | Yes | The run ID to fetch details for | |
| 59 | + |
| 60 | +#### Output |
| 61 | + |
| 62 | +| Parameter | Type | Description | |
| 63 | +| --------- | ---- | ----------- | |
| 64 | +| `runId` | string | The run ID | |
| 65 | +| `workflowId` | string | Workflow ID this run belongs to | |
| 66 | +| `workflowName` | string | Workflow name | |
| 67 | +| `status` | string | Run status | |
| 68 | +| `trigger` | string | How the run was triggered | |
| 69 | +| `startedAt` | string | Run start time \(ISO 8601\) | |
| 70 | +| `durationMs` | number | Run duration in milliseconds | |
| 71 | +| `cost` | number | Run cost in credits | |
| 72 | +| `traceSpans` | array | Full trace spans for the run | |
| 73 | +| `finalOutput` | json | Final output of the run | |
| 74 | + |
| 75 | + |
0 commit comments