Tool: get_operation
Gets the details of a specific GKE operation.
The following sample demonstrate how to use curl
to invoke the get_operation
MCP tool.
| Curl Request |
|---|
curl --location 'https://container.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_operation", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
MCPGetOperationRequest gets a single operation.
MCPGetOperationRequest
| JSON representation |
|---|
{ "name" : string } |
| Fields | |
|---|---|
name
|
Required. The name (project, location, operation id) of the operation to get. Specified in the format |
Output Schema
This operation resource represents operations that may have happened or are happening on the cluster. All fields are output only.
Operation
| JSON representation |
|---|
{ "name" : string , "zone" : string , "operationType" : enum ( |
| Fields | |
|---|---|
name
|
Output only. The server-assigned ID for the operation. |
zone
|
Output only. The name of the Google Compute Engine zone in which the operation is taking place. This field is deprecated, use location instead. |
operationType
|
Output only. The operation type. |
status
|
Output only. The current status of the operation. |
detail
|
Output only. Detailed operation progress, if available. |
statusMessage
|
Output only. If an error has occurred, a textual description of the error. Deprecated. Use the field error instead. |
selfLink
|
Output only. Server-defined URI for the operation. Example: |
targetLink
|
Output only. Server-defined URI for the target of the operation. The format of this is a URI to the resource being modified (such as a cluster, node pool, or node). For node pool repairs, there may be multiple nodes being repaired, but only one will be the target. Examples: - |
location
|
Output only. The name of the Google Compute Engine zone or region in which the cluster resides. |
startTime
|
Output only. The time the operation started, in RFC3339 text format. |
endTime
|
Output only. The time the operation completed, in RFC3339 text format. |
progress
|
Output only. Progress information for an operation. |
clusterConditions[]
|
Which conditions caused the current cluster state. Deprecated. Use field error instead. |
nodepoolConditions[]
|
Which conditions caused the current node pool state. Deprecated. Use field error instead. |
error
|
The error result of the operation in case of failure. |
OperationProgress
| JSON representation |
|---|
{ "name" : string , "status" : enum ( |
| Fields | |
|---|---|
name
|
A non-parameterized string describing an operation stage. Unset for single-stage operations. |
status
|
Status of an operation stage. Unset for single-stage operations. |
metrics[]
|
Progress metric bundle, for example: metrics: [{name: "nodes done", int_value: 15}, {name: "nodes total", int_value: 32}] or metrics: [{name: "progress", double_value: 0.56}, {name: "progress scale", double_value: 1.0}] |
stages[]
|
Substages of an operation or a stage. |
Metric
| JSON representation |
|---|
{ "name" : string , // Union field |
name
string
Required. Metric name, e.g., "nodes total", "percent done".
value
. Strictly one of the values is required. value
can be only one of the following:intValue
string ( int64
format)
For metrics with integer value.
doubleValue
number
For metrics with floating point value.
stringValue
string
For metrics with custom values (ratios, visual progress, etc.).
StatusCondition
| JSON representation |
|---|
{ "code" : enum ( |
| Fields | |
|---|---|
code
|
Machine-friendly representation of the condition Deprecated. Use canonical_code instead. |
message
|
Human-friendly representation of the condition |
canonicalCode
|
Canonical code of the condition. |
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 |
Any
| JSON representation |
|---|
{ "typeUrl" : string , "value" : string } |
typeUrl
string
A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in path/google.protobuf.Duration
). The name should be in a canonical form (e.g., leading "." is not accepted).
In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme http
, https
, or no scheme, one can optionally set up a type server that maps type URLs to message definitions as follows:
- If no scheme is provided,
httpsis assumed. - An HTTP GET on the URL must yield a
google.protobuf.Typevalue in binary format, or produce an error. - Applications are allowed to cache lookup results based on the URL, or have them precompiled into a binary to avoid any lookup. Therefore, binary compatibility needs to be preserved on changes to types. (Use versioned type names to manage breaking changes.)
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one.
Schemes other than http
, https
(or the empty scheme) might be used with implementation specific semantics.
value
string ( bytes
format)
Must be a valid serialized protocol buffer of the above specified type.
A base64-encoded string.
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

