get_flight
Fetch a single Flight. Returns Flight metadata plus the content of a specific version (source code, requirements, config, secret names, token name). Omit version for the current version; pass a 1-indexed version to inspect history.
Description
The get_flight tool combines metadata and version content into one response, so the assistant does not need separate calls for "find the Flight" and "read its source." Use it to inspect a Flight before editing, or to read the source that ran for a specific past run.
Users can fetch Flights they have created. Admins can fetch Flights they own as well as any Flight in the organization. The ability to edit, run, and delete a Flight is restricted to the Flight creator.
The SQL equivalent is MD_GET_FLIGHT plus MD_GET_FLIGHT_VERSION.
Input parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string (UUID) | Yes | The Flight UUID. |
version | integer | No | 1-indexed version number. Omit for the current version. |
Output schema
{
"success": boolean,
"flight": {
"flight_id": string,
"flight_name": string,
"created_at": string,
"updated_at": string,
"schedule_cron": string|null,
"status": string,
"schedule_status": string|null,
"current_version": number,
"owner_name": string|null, // The user who owns the Flight
"version_info": {
"version_id": string,
"flight_id": string,
"version": number,
"created_at": string,
"source_code": string,
"requirements_txt": string|null,
"config": { "<key>": "<value>" },
"access_token_name": string,
"flight_secret_names": string[],
"max_runtime_sec": number // Per-run timeout in seconds; 0 means none
}
},
"error": string
}
Example usage
Inspect the current Flight:
{ "id": "80000000-0000-0000-0000-000000000001" }
Inspect version 2:
{ "id": "80000000-0000-0000-0000-000000000001", "version": 2 }
Related
list_flight_versions— Find available version numbers.list_flight_runs— Each run includes the version it ran against.MD_GET_FLIGHT— SQL equivalent for current summary.