MCP Tools Reference: composer.googleapis.com

Tool: list_dags

Lists all DAGs in a Managed Airflow environment.

Use this tool to get a list of all DAGs in the environment, for example to discover the DAGs present in the environment or get the state or properties of each DAG.

Results are paginated; use page_size to control the number of results per page and page_token from a previous response to get the next page. If page_token is not present in the response, there are no more results.

The following code sample shows how to use curl to call the list_dags 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_dags",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

Input Schema

Parameters of the list_dags tool.

ListDagsRequestMCP

JSON representation
{
  "environment": string,
  "pageSize": integer,
  "pageToken": string
}
Fields
environment

string

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

pageSize

integer

Optional. The maximum number of DAGs to return. The tool may return fewer than this value. If unspecified or set to 0, defaults to 20.

pageToken

string

Optional. A page token, received from a previous ListDags call. Provide this to retrieve the subsequent page.

Output Schema

Response to ListDagsRequest.

ListDagsResponse

JSON representation
{
  "dags": [
    {
      object (Dag)
    }
  ],
  "nextPageToken": string
}
Fields
dags[]

object (Dag)

The list of DAGs returned.

nextPageToken

string

The page token used to query for the next page if one exists.

Dag

JSON representation
{
  "name": string,
  "dagId": string,
  "state": enum (State),
  "description": string,
  "runningCount": integer,
  "lastRunEndTime": string,
  "fileloc": string,
  "startDate": string,
  "endDate": string,
  "catchup": enum (CatchupValue),
  "maxActiveRuns": integer,
  "maxActiveTasks": integer,
  "dagrunTimeout": string,
  "lastUpdated": string,
  "failStop": boolean,
  "tags": [
    string
  ],
  "docMd": string,

  // Union field schedule can be only one of the following:
  "cronSchedule": string,
  "durationSchedule": string
  // End of list of possible types for union field schedule.
}
Fields
name

string

Required. The resource name of the DAG, in the form: "projects/{projectId}/locations/{locationId}/environments/{environmentId}/dags/{dagId}".

dagId

string

Required. The DAG ID.

state

enum (State)

Output only. The current state of the DAG.

description

string

The description of the DAG.

runningCount

integer

The number of running instances of the DAG.

lastRunEndTime

string (Timestamp format)

The end timestamp of the last completed DAG run.

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

fileloc

string

File location relative to the Cloud Storage bucket root folder.

startDate

string (Timestamp format)

The start_date parameter of the DAG.

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)

The end_date parameter of the DAG (if set).

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

catchup

enum (CatchupValue)

Whether the catchup is enabled for the DAG.

maxActiveRuns

integer

Maximum number of simultaneous active runs of the DAG. Default is zero.

maxActiveTasks

integer

Maximum number of simultaneous active tasks of the DAG. Default is zero.

dagrunTimeout

string (Duration format)

Maximum runtime of a DAG run before termination with a timeout.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

lastUpdated

string (Timestamp format)

The last time the DAG has been serialized.

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

failStop

boolean

Whether a "fail_stop" mode is enabled for the DAG.

tags[]

string

The list of all tags associated with the DAG.

docMd

string

Describes the DAG in Markdown format.

Union field schedule. The schedule interval at which the DAG is run. schedule can be only one of the following:
cronSchedule

string

The DAG's schedule in cron format.

durationSchedule

string (Duration format)

The DAG's schedule as a time duration between runs.

A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".

Duration

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

string (int64 format)

Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years

nanos

integer

Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 seconds field and a positive or negative nanos field. For durations of one second or more, a non-zero value for the nanos field must be of the same sign as the seconds field. Must be from -999,999,999 to +999,999,999 inclusive.

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.

State

State of the DAG.

Enums
STATE_UNSPECIFIED The state of the DAG is unknown.
ACTIVE The DAG is available for execution.
PAUSED The DAG is paused.

CatchupValue

Catchup value of the DAG.

Enums
CATCHUP_VALUE_UNSPECIFIED The state of the Cachup is unknown.
ENABLED The catchup is enabled.
DISABLED The catchup is disabled.

Tool Annotations

Tool annotations are sent to MCP clients to describe the basic risk of a given tool. Most clients treat these hints as untrusted, but they can be used to decide when a confirmation prompt might be sent to a user.

Along with the title string, the following boolean hints are defined as follows:

  • readOnlyHint: If true, the tool doesn't modify its environment. Default: false.
  • destructiveHint: If true, then the tool can perform destructive actions. If false, then the tool can only perform additive actions. Default: true.
  • idempotentHint: If true, then calling the tool repeatedly with the same arguments will have no additional effect on its environment. Default: false.
  • openWorldHint: If true, then the tool can interact with an 'open world' of external entities. If false, then the tool can only interact with internal entities. For example, a web search tool would be open world, while a memory tool would not be open world.

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