MCP Tools Reference: composer.googleapis.com

Tool: list_failed_task_instances

Lists failed task instances of a specific DAG run in a Cloud Composer environment.

If a DAG run has failed, use this tool to get the list of task instances of this DAG run that are in the FAILED state and may have caused the DAG run failure.

This tool does not return task instance logs directly. Instead, for each task instance, use the cloud_logging_filter field from the response to query Cloud Logging for the logs for that task instance.

The following sample demonstrate how to use curl to invoke the list_failed_task_instances MCP tool.

Curl Request
                  
curl --location 'https://composer.{region}.rep.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "list_failed_task_instances",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

Input Schema

Parameters of the list_failed_task_instances tool.

ListFailedTaskInstancesRequestMCP

JSON representation
{
  "environment": string,
  "dagId": string,
  "dagRunId": string
}
Fields
environment

string

Required. The name of the environment. Format: projects/{projectId}/locations/{locationId}/environments/{environmentId}

dagId

string

Required. The Airflow DAG ID.

dagRunId

string

Required. The Airflow DAG run ID.

Output Schema

Response of the list_failed_task_instances tool.

ListFailedTaskInstancesResponseMCP

JSON representation
{
  "taskInstances": [
    {
      object (TaskInstance)
    }
  ]
}
Fields
taskInstances[]

object (TaskInstance)

The list of failed task instances.

TaskInstance

JSON representation
{
  "name": string,
  "id": string,
  "taskId": string,
  "dagRunId": string,
  "dagId": string,
  "taskType": string,
  "executionDate": string,
  "startDate": string,
  "endDate": string,
  "runAfter": string,
  "state": enum (State),
  "tryNumber": integer,
  "hostname": string,
  "queuedDttm": string,
  "pool": string,
  "queue": string,
  "priorityWeight": integer,
  "maxTries": integer,
  "isDynamicallyMapped": boolean,
  "mapIndex": integer,
  "externalExecutorId": string,
  "renderedMapIndex": string,
  "note": string,
  "cloudLoggingFilter": string
}
Fields
name

string

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}".

id

string

The task instance ID. It is the same as the task ID of a DAG.

taskId

string

The task instance ID. It is the same as the task ID in the DAG.

dagRunId

string

The DAG run ID the task instance belongs to.

dagId

string

The DAG ID of the DAG whose execution is described by the DAG run the taskInstance belongs to.

taskType

string

The operator used in this task.

executionDate

string (Timestamp format)

Execution date for the task.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

startDate

string (Timestamp format)

Timestamp when the task instance started execution.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

endDate

string (Timestamp format)

Timestamp when the task instance finished execution.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

runAfter

string (Timestamp format)

Timestamp when the parent DAG run was scheduled to start. Added in Airflow 3.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

state

enum (State)

Task instance state.

tryNumber

integer

The try number that this task number will be when it is actually run.

hostname

string

Hostname of the machine or pod the task runs on.

queuedDttm

string (Timestamp format)

Timestamp when the task was queued.

Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: "2014-10-02T15:01:23Z", "2014-10-02T15:01:23.045123456Z" or "2014-10-02T15:01:23+05:30".

pool

string

The slot pool this task runs in.

queue

string

Which queue to target when running this task.

priorityWeight

integer

Priority weight of this task against other tasks.

maxTries

integer

The number of tries that should be performed before failing the task.

isDynamicallyMapped

boolean

Whether this TaskInstance is dynamically mapped.

mapIndex

integer

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.

externalExecutorId

string

ID of the external executor.

renderedMapIndex

string

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.

note

string

The note content of the task instance. Added in Airflow 2.10.0.

cloudLoggingFilter

string

A Cloud Logging filter that can be used to retrieve the logs of this task instance.

Timestamp

JSON representation
{
  "seconds": string,
  "nanos": integer
}
Fields
seconds

string (int64 format)

Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z).

nanos

integer

Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive.

Tool Annotations

Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌