Tool: list_managed_instances
Lists managed instances for a given managed instance group (MIG). For each instance, details include id, instance URL, instance status, and current action. Requires project, zone, and MIG name as input.
The following sample demonstrate how to use curl to invoke the list_managed_instances 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": "list_managed_instances", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for listing managed instances.
| JSON representation |
|---|
{ "project": string, "zone": string, "name": string, "pageSize": integer, "pageToken": string } |
| Fields | |
|---|---|
project |
Required. Project ID for this request. |
zone |
Required. The zone of the instance group manager. |
name |
Required. Identifier. The instance group manager name. |
pageSize |
Optional. The maximum number of managed instances to return. |
pageToken |
Optional. A page token received from a previous call to list managed instances. |
Output Schema
Response message for listing managed instances.
| JSON representation |
|---|
{
"managedInstances": [
{
object ( |
| Fields | |
|---|---|
managedInstances[] |
The list of managed instances. |
nextPageToken |
A token that can be sent as |
| JSON representation |
|---|
{ "name": string, "instance": string, "id": string, "instanceStatus": enum ( |
| Fields | |
|---|---|
name |
Output only. [Output Only] The name of the instance. The name always exists even if the instance has not yet been created. |
instance |
Output only. [Output Only] The URL of the instance. The URL can exist even if the instance has not yet been created. |
id |
Output only. [Output only] The unique identifier for this resource. This field is empty when instance does not exist. |
instanceStatus |
Output only. [Output Only] The status of the instance. This field is empty when the instance does not exist. |
version |
Output only. [Output Only] Intended version of this instance. |
preservedStateFromPolicy |
Output only. [Output Only] Preserved state generated based on stateful policy for this instance. |
preservedStateFromConfig |
Output only. [Output Only] Preserved state applied from per-instance config for this instance. |
currentAction |
Output only. [Output Only] The current action that the managed instance group has scheduled for the instance. Possible values:
|
instanceHealth[] |
Output only. [Output Only] Health state of the instance per health-check. |
lastAttempt |
Output only. [Output Only] Information about the last attempt to create or delete the instance. |
propertiesFromFlexibilityPolicy |
Output only. [Output Only] Instance properties selected for this instance resulting from InstanceFlexibilityPolicy. |
| JSON representation |
|---|
{ "name": string, "instanceTemplate": string } |
| Fields | |
|---|---|
name |
Output only. [Output Only] Name of the version. |
instanceTemplate |
Output only. [Output Only] The intended template of the instance. This field is empty when current_action is one of { DELETING, ABANDONING }. |
| JSON representation |
|---|
{ "disks": { string: { object ( |
| Fields | |
|---|---|
disks |
Preserved disks defined for this instance. This map is keyed with the device names of the disks. An object containing a list of |
metadata |
Preserved metadata defined for this instance. An object containing a list of |
internalIPs |
Preserved internal IPs defined for this instance. This map is keyed with the name of the network interface. An object containing a list of |
externalIPs |
Preserved external IPs defined for this instance. This map is keyed with the name of the network interface. An object containing a list of |
disksAlts[] |
|
metadataAlts[] |
|
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{ "source": string, "mode": enum ( |
| Fields | |
|---|---|
source |
The URL of the disk resource that is stateful and should be attached to the VM instance. |
mode |
The mode in which to attach this disk, either |
autoDelete |
These stateful disks will never be deleted during autohealing, update, instance recreate operations. This flag is used to configure if the disk should be deleted after it is no longer used by the group, e.g. when the given instance or the whole MIG is deleted. Note: disks attached in |
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{ "autoDelete": enum ( |
| Fields | |
|---|---|
autoDelete |
These stateful IPs will never be released during autohealing, update or VM instance recreate operations. This flag is used to configure if the IP reservation should be deleted after it is no longer used by the group, e.g. when the given instance or the whole group is deleted. |
ipAddress |
Ip address representation |
| JSON representation |
|---|
{ "literal": string, "address": string } |
| Fields | |
|---|---|
literal |
An IPv4 internal network address to assign to the instance for this network interface. |
address |
The URL of the reservation for this IP address. |
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{ "fields": { string: value, ... } } |
| Fields | |
|---|---|
fields |
Unordered map of dynamically typed values. An object containing a list of |
| JSON representation |
|---|
{ "key": string, "value": value } |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of value. kind can be only one of the following: |
|
nullValue |
Represents a null value. |
numberValue |
Represents a double value. |
stringValue |
Represents a string value. |
boolValue |
Represents a boolean value. |
structValue |
Represents a structured value. |
listValue |
Represents a repeated |
| JSON representation |
|---|
{ "values": [ value ] } |
| Fields | |
|---|---|
values[] |
Repeated field of dynamically typed values. |
| JSON representation |
|---|
{
"healthCheck": string,
"detailedHealthState": enum ( |
| Fields | |
|---|---|
healthCheck |
Output only. [Output Only] The URL for the health check that verifies whether the instance is healthy. |
detailedHealthState |
Output only. [Output Only] The current detailed instance health state. |
| JSON representation |
|---|
{ "errors": { "errors": [ { "code": string, "location": string, "message": string, "errorDetails": [ { "errorInfo": { object ( |
| Fields | |
|---|---|
errors |
Output only. [Output Only] Encountered errors during the last attempt to create or delete the instance. |
errors[] |
[Output Only] The array of errors encountered while processing this operation. |
code |
[Output Only] The error type identifier for this error. |
location |
[Output Only] Indicates the field in the request that caused the error. This property is optional. |
message |
[Output Only] An optional, human-readable error message. |
errorDetails[] |
[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 |
|
quotaInfo |
|
help |
|
localizedMessage |
|
| JSON representation |
|---|
{ "errors": [ { "code": string, "location": string, "message": string, "errorDetails": [ { // Union field |
| Fields | |
|---|---|
errors[] |
[Output Only] The array of errors encountered while processing this operation. |
code |
[Output Only] The error type identifier for this error. |
location |
[Output Only] Indicates the field in the request that caused the error. This property is optional. |
message |
[Output Only] An optional, human-readable error message. |
errorDetails[] |
[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 |
|
quotaInfo |
|
help |
|
localizedMessage |
|
| JSON representation |
|---|
{ "code": string, "location": string, "message": string, "errorDetails": [ { "errorInfo": { object ( |
| Fields | |
|---|---|
code |
[Output Only] The error type identifier for this error. |
location |
[Output Only] Indicates the field in the request that caused the error. This property is optional. |
message |
[Output Only] An optional, human-readable error message. |
errorDetails[] |
[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 |
|
quotaInfo |
|
help |
|
localizedMessage |
|
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field
|
|
errorInfo |
|
quotaInfo |
|
help |
|
localizedMessage |
|
| JSON representation |
|---|
{ "reason": string, "domain": string, "metadatas": { string: string, ... } } |
| Fields | |
|---|---|
reason |
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 |
domain |
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 |
Additional structured details about this error. Keys must match a regular expression of An object containing a list of |
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{
"metricName": string,
"limitName": string,
"dimensions": {
string: string,
...
},
"limit": number,
"futureLimit": number,
"rolloutStatus": enum ( |
| Fields | |
|---|---|
metricName |
The Compute Engine quota metric name. |
limitName |
The name of the quota limit. |
dimensions |
The map holding related quota dimensions. An object containing a list of |
limit |
Current effective quota limit. The limit's unit depends on the quota type or metric. |
futureLimit |
Future quota limit being rolled out. The limit's unit depends on the quota type or metric. |
rolloutStatus |
Rollout status of the future quota limit. |
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
| JSON representation |
|---|
{
"links": [
{
object ( |
| Fields | |
|---|---|
links[] |
URL(s) pointing to additional information on handling the current error. |
| JSON representation |
|---|
{ "description": string, "url": string } |
| Fields | |
|---|---|
description |
Describes what the link offers. |
url |
The URL of the link. |
| JSON representation |
|---|
{ "locale": string, "message": string } |
| Fields | |
|---|---|
locale |
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 |
The localized error message in the above locale. |
| JSON representation |
|---|
{ "machineType": string } |
| Fields | |
|---|---|
machineType |
Output only. The machine type to be used for this instance. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌