get_task_instance
Retrieves details of a specific task instance from a Managed Airflow environment.
Use this tool to retrieve details of a specific task instance, such as its state, start time, end time, or parameters, to understand its status or to debug a failure.
This tool does not return task instance logs directly. Instead, use the
cloud_logging_filter field from the response to query Cloud Logging for the logs for
this task instance.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"environment": "<environment>",
"dagId": "<dagId>",
"dagRunId": "<dagRunId>",
"taskId": "<taskId>"
},
"name": "get_task_instance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dagId | Yes | Required. The Airflow DAG ID. | |
| taskId | Yes | Required. The Airflow task ID. | |
| dagRunId | Yes | Required. The Airflow DAG run ID. | |
| mapIndex | No | Optional. For mapped tasks, the map index of the task. It should not be populated for non-mapped tasks. | |
| environment | Yes | Required. The name of the environment. Format: `projects/{projectId}/locations/{locationId}/environments/{environmentId}` |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | The task instance ID. It is the same as the task ID of a DAG. | |
| name | No | Required. The resource name of the task instance, in the form: "projects/{project_id}/locations/{location_id}/environments/{environment_id}/dags/{dag_id}/dagRuns/{dag_run_id}/taskInstances/{task_instance_id_with_optional_map_index}". | |
| note | No | The note content of the task instance. Added in Airflow 2.10.0. | |
| pool | No | The slot pool this task runs in. | |
| dagId | No | The DAG ID of the DAG whose execution is described by the DAG run the taskInstance belongs to. | |
| queue | No | Which queue to target when running this task. | |
| state | No | Task instance state. | |
| taskId | No | The task instance ID. It is the same as the task ID in the DAG. | |
| endDate | No | Timestamp when the task instance finished execution. | |
| dagRunId | No | The DAG run ID the task instance belongs to. | |
| hostname | No | Hostname of the machine or pod the task runs on. | |
| mapIndex | No | If is_dynamically_mapped is set to true, this field contains index of the dynamically-mapped TaskInstance, If is_dynamically_mapped is set to false, this field has no meaning. | |
| maxTries | No | The number of tries that should be performed before failing the task. | |
| runAfter | No | Timestamp when the parent DAG run was scheduled to start. Added in Airflow 3. | |
| taskType | No | The operator used in this task. | |
| startDate | No | Timestamp when the task instance started execution. | |
| tryNumber | No | The try number that this task number will be when it is actually run. | |
| queuedDttm | No | Timestamp when the task was queued. | |
| executionDate | No | Execution date for the task. | |
| priorityWeight | No | Priority weight of this task against other tasks. | |
| renderedMapIndex | No | Named mapping - a rendered map index template for this task instance. If task doesn't have a template specified or is_dynamically_mapped is set to false, this field is empty. | |
| cloudLoggingFilter | No | Output only. A Cloud Logging filter that can be used to retrieve the logs of this task instance. | |
| externalExecutorId | No | ID of the external executor. | |
| isDynamicallyMapped | No | Whether this TaskInstance is dynamically mapped. |