Tool: create_environment
Initiates the creation of a new Cloud Composer environment with default settings.
This tool creates a small private IP environment with a default configuration, including default networking settings.
Creating public IP environments, or customizing most settings (such as network, subnetwork, network attachment, environment size, CMEK or custom environment bucket) is not supported.
If the user requests settings that aren't supported by the tool parameters, inform them that this tool can't create an environment in the requested configuration, and that they should use gcloud CLI or Cloud Console instead.
Some environment configuration parameters are mandatory. Always ask about them:
Always ask the user to provide a service account that they want to use for their environment. Users are strongly recommended to use a dedicated user-managed service account and are discouraged from using the default Cloud Compute service account for security reasons.
Always ask the user to specify the IP ranges that they want to use to access the Airflow UI and web server. If the user doesn't specify IP ranges, clarify that the default is not allowing access from any IPs. We also recommend to not allow access from all IP addresses to avoid potential security risks.
This tool creates an environment without pre-installed PyPI packages. Use the manage_pypi_packages tool to install PyPI packages after the environment is created.
This tool triggers the environment creation process, which is a long-running operation. The tool returns an operation object. Use the get_operation tool with the operation name returned by this tool to poll for creation status. Environment creation typically takes 25-30 minutes. A completed operation will include the details of the created environment.
The following sample demonstrate how to use curl to invoke the create_environment 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": "create_environment", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Parameters of the create_environment tool.
CreateEnvironmentRequestMCP
| JSON representation |
|---|
{ "parent": string, "environmentId": string, "serviceAccount": string, "allowedWebServerIpRanges": [ string ], "imageVersion": string } |
| Fields | |
|---|---|
parent |
Required. The parent resource under which the environment is created. Format: |
environmentId |
Required. The name of the environment. |
serviceAccount |
Required. The Google Cloud Platform Service Account to be used by the environment. |
allowedWebServerIpRanges[] |
Required. Specifies the IP ranges allowed to access the Airflow web server.
|
imageVersion |
Optional. The version of the Composer environment. If not specified, the latest version of Composer 3 and Airflow 2 will be used. Users are recommended to use Composer 3 over Composer 2. The format must match Example values: * |
Output Schema
This resource represents a long-running operation that is the result of a network API call.
Operation
| JSON representation |
|---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
| Fields | |
|---|---|
name |
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the |
metadata |
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. An object containing fields of an arbitrary type. An additional field |
done |
If the value is |
Union field result. The operation result, which can be either an error or a valid response. If done == false, neither error nor response is set. If done == true, exactly one of error or response can be set. Some services might not provide the result. result can be only one of the following: |
|
error |
The error result of the operation in case of failure or cancellation. |
response |
The normal, successful response of the operation. If the original method returns no data on success, such as An object containing fields of an arbitrary type. An additional field |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): In the original design of |
value |
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
Status
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ❌ | Open World Hint: ❌