MCP Tools Reference: compute.googleapis.com

Tool: get_zone_operation

Get details of a zone operation, including its id, name, status, creation timestamp, error, warning, HTTP error message and HTTP error status code. Requires project, zone, and operation name as input.

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

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

Input Schema

Request message for getting zone operation.

JSON representation
{
  "project": string,
  "zone": string,
  "name": string
}
Fields
project

string

Required. Project ID for this request.

zone

string

Required. The zone of the operation.

name

string

Required. Identifier. The operation name.

Output Schema

Represents an operation.

JSON representation
{
  "id": string,
  "name": string,
  "status": enum (OperationStatus),
  "createTime": string,
  "error": {
    "errors": [
      {
        "code": string,
        "location": string,
        "message": string,
        "errorDetails": [
          {
            "errorInfo": {
              object (ErrorInfo)
            },
            "quotaInfo": {
              object (QuotaExceededInfo)
            },
            "help": {
              object (google.rpc.Help)
            },
            "localizedMessage": {
              object (google.rpc.LocalizedMessage)
            }
          }
        ]
      }
    ]
  },
  "warnings": [
    {
      "code": enum (WarningCode),
      "message": string,
      "data": [
        {
          "key": string,
          "value": string
        }
      ]
    }
  ],
  "httpErrorMessage": string,
  "httpErrorStatusCode": integer
}
Fields
id

string (uint64 format)

The unique identifier for the operation.

name

string

Name of the operation.

status

enum (OperationStatus)

The status of the operation.

createTime

string (Timestamp format)

Creation timestamp of the operation.

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

error

object

Errors encountered during the operation execution.

errors[]

object

[Output Only] The array of errors encountered while processing this operation.

code

string

[Output Only] The error type identifier for this error.

location

string

[Output Only] Indicates the field in the request that caused the error. This property is optional.

message

string

[Output Only] An optional, human-readable error message.

errorDetails[]

object

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

errorInfo

object (ErrorInfo)

quotaInfo

object (QuotaExceededInfo)

help

object (google.rpc.Help)

localizedMessage

object (google.rpc.LocalizedMessage)

warnings[]

object

Warnings encountered during the operation execution.

code

enum (WarningCode)

[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.

message

string

[Output Only] A human-readable description of the warning code.

data[]

object

[Output Only] Metadata about this warning in key: value format. For example:

"data": [  {  "key": "scope",  "value": "zones/us-east1-d"  }

key

string

[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).

value

string

[Output Only] A warning data value corresponding to the key.

httpErrorMessage

string

If the operation fails, this field contains the HTTP error message that corresponds to the HTTP error code generated for the audit log.

httpErrorStatusCode

integer

If the operation fails, this field contains the HTTP error status code that corresponds to the HTTP error message generated for the audit log.

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.

JSON representation
{
  "errors": [
    {
      "code": string,
      "location": string,
      "message": string,
      "errorDetails": [
        {

          // Union field details_oneof can be only one of the following:
          "errorInfo": {
            object (ErrorInfo)
          },
          "quotaInfo": {
            object (QuotaExceededInfo)
          },
          "help": {
            object (google.rpc.Help)
          },
          "localizedMessage": {
            object (google.rpc.LocalizedMessage)
          }
          // End of list of possible types for union field details_oneof.
        }
      ]
    }
  ]
}
Fields
errors[]

object

[Output Only] The array of errors encountered while processing this operation.

code

string

[Output Only] The error type identifier for this error.

location

string

[Output Only] Indicates the field in the request that caused the error. This property is optional.

message

string

[Output Only] An optional, human-readable error message.

errorDetails[]

object

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

errorInfo

object (ErrorInfo)

quotaInfo

object (QuotaExceededInfo)

help

object (google.rpc.Help)

localizedMessage

object (google.rpc.LocalizedMessage)

JSON representation
{
  "code": string,
  "location": string,
  "message": string,
  "errorDetails": [
    {
      "errorInfo": {
        object (ErrorInfo)
      },
      "quotaInfo": {
        object (QuotaExceededInfo)
      },
      "help": {
        object (google.rpc.Help)
      },
      "localizedMessage": {
        object (google.rpc.LocalizedMessage)
      }
    }
  ]
}
Fields
code

string

[Output Only] The error type identifier for this error.

location

string

[Output Only] Indicates the field in the request that caused the error. This property is optional.

message

string

[Output Only] An optional, human-readable error message.

errorDetails[]

object

[Output Only] An optional list of messages that contain the error details. There is a set of defined message types to use for providing details.The syntax depends on the error code. For example, QuotaExceededInfo will have details when the error code is QUOTA_EXCEEDED.

errorInfo

object (ErrorInfo)

quotaInfo

object (QuotaExceededInfo)

help

object (google.rpc.Help)

localizedMessage

object (google.rpc.LocalizedMessage)

JSON representation
{

  // Union field details_oneof can be only one of the following:
  "errorInfo": {
    object (ErrorInfo)
  },
  "quotaInfo": {
    object (QuotaExceededInfo)
  },
  "help": {
    object (google.rpc.Help)
  },
  "localizedMessage": {
    object (google.rpc.LocalizedMessage)
  }
  // End of list of possible types for union field details_oneof.
}
Fields

Union field details_oneof.

details_oneof can be only one of the following:

errorInfo

object (ErrorInfo)

quotaInfo

object (QuotaExceededInfo)

help

object (google.rpc.Help)

localizedMessage

object (google.rpc.LocalizedMessage)

JSON representation
{
  "reason": string,
  "domain": string,
  "metadatas": {
    string: string,
    ...
  }
}
Fields
reason

string

The reason of the error. This is a constant value that identifies the proximate cause of the error. Error reasons are unique within a particular domain of errors. This should be at most 63 characters and match a regular expression of [A-Z][A-Z0-9_]+[A-Z0-9], which represents UPPER_SNAKE_CASE.

domain

string

The logical grouping to which the "reason" belongs. The error domain is typically the registered service name of the tool or product that generates the error. Example: "pubsub.googleapis.com". If the error is generated by some common infrastructure, the error domain must be a globally unique value that identifies the infrastructure. For Google API infrastructure, the error domain is "googleapis.com".

metadatas

map (key: string, value: string)

Additional structured details about this error.

Keys must match a regular expression of [a-z][a-zA-Z0-9-_]+ but should ideally be lowerCamelCase. Also, they must be limited to 64 characters in length. When identifying the current value of an exceeded limit, the units should be contained in the key, not the value. For example, rather than {"instanceLimit": "100/request"}, should be returned as, {"instanceLimitPerRequest": "100"}, if the client exceeds the number of instances that can be created in a single (batch) request.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

JSON representation
{
  "metricName": string,
  "limitName": string,
  "dimensions": {
    string: string,
    ...
  },
  "limit": number,
  "futureLimit": number,
  "rolloutStatus": enum (RolloutStatus)
}
Fields
metricName

string

The Compute Engine quota metric name.

limitName

string

The name of the quota limit.

dimensions

map (key: string, value: string)

The map holding related quota dimensions.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

limit

number

Current effective quota limit. The limit's unit depends on the quota type or metric.

futureLimit

number

Future quota limit being rolled out. The limit's unit depends on the quota type or metric.

rolloutStatus

enum (RolloutStatus)

Rollout status of the future quota limit.

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

value

string

JSON representation
{
  "links": [
    {
      object (google.rpc.Help.Link)
    }
  ]
}
Fields
links[]

object (google.rpc.Help.Link)

URL(s) pointing to additional information on handling the current error.

JSON representation
{
  "description": string,
  "url": string
}
Fields
description

string

Describes what the link offers.

url

string

The URL of the link.

JSON representation
{
  "locale": string,
  "message": string
}
Fields
locale

string

The locale used following the specification defined at https://www.rfc-editor.org/rfc/bcp/bcp47.txt. Examples are: "en-US", "fr-CH", "es-MX"

message

string

The localized error message in the above locale.

JSON representation
{
  "code": enum (WarningCode),
  "message": string,
  "data": [
    {
      "key": string,
      "value": string
    }
  ]
}
Fields
code

enum (WarningCode)

[Output Only] A warning code, if applicable. For example, Compute Engine returns NO_RESULTS_ON_PAGE if there are no results in the response.

message

string

[Output Only] A human-readable description of the warning code.

data[]

object

[Output Only] Metadata about this warning in key: value format. For example:

"data": [  {  "key": "scope",  "value": "zones/us-east1-d"  }

key

string

[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).

value

string

[Output Only] A warning data value corresponding to the key.

JSON representation
{
  "key": string,
  "value": string
}
Fields
key

string

[Output Only] A key that provides more detail on the warning being returned. For example, for warnings where there are no results in a list request for a particular zone, this key might be scope and the key value might be the zone name. Other examples might be a key indicating a deprecated resource and a suggested replacement, or a warning about invalid network settings (for example, if an instance attempts to perform IP forwarding but is not enabled for IP forwarding).

value

string

[Output Only] A warning data value corresponding to the key.

Tool Annotations

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