get_flight_run_logs
Preview
This feature is in preview and is subject to change.
Fetch the plain-text combined stdout and stderr of a Flight run, plus the matching Run record (status, exit code, timing). The response also reports whether the log was truncated.
The SQL equivalent is MD_GET_FLIGHT_LOGS — note that the SQL surface returns only the logs, while this MCP tool also returns the run record.
Description
Use get_flight_run_logs to interpret a failed run without a follow-up call: status, exit code, and timing arrive in the same response as the log content. For runs with large logs, pass max_bytes to cap the response size; the response returns the tail and sets truncated: true.
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | The Flight UUID. |
run_number | integer | Yes | Sequential run number from list_flight_runs. |
max_bytes | integer | No | Maximum log bytes to return. Minimum 1024. Truncation returns the tail. |
Output schema
{
"success": boolean,
"flight_id": string,
"run_number": number,
"run": {
"run_id": string,
"flight_id": string,
"flight_name": string,
"flight_version": number,
"config": object, // effective config for the run, including per-run overrides
"run_number": number,
"is_scheduled": boolean,
"status": string, // PENDING | RUNNING | SUCCEEDED | FAILED | CANCELLED
"created_at": string,
"started_at": string|null,
"ended_at": string|null,
"scheduled_at": string,
"cancelled_at": string|null,
"exit_code": number|null
},
"logs": string, // Combined stdout + stderr
"truncated": boolean, // True if max_bytes truncated the log
"original_length": number, // Full log length in bytes, present when truncated
"error": string
}
Example usage
Read the full logs for run 42:
{ "id": "80000000-...", "run_number": 42 }
Read only the last 4 KB:
{ "id": "80000000-...", "run_number": 42, "max_bytes": 4096 }
Related
list_flight_runs— Find therun_numberto read.MD_GET_FLIGHT_LOGS— SQL equivalent (logs only).