MCP Tools Reference: compute.googleapis.com

Tool: list_commitment_reservations

Lists reservations for a Compute Engine Commitment. Returns reservation details including name, ID, status, creation timestamp, specific reservation properties like machine type, guest accelerators and local SSDs, aggregate reservation properties like VM family and reserved resources, commitment and linked commitments, sharing settings, and resource status. Requires project, region, and commitment name as input.

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

Input Schema

Request message for listing reservations for a region commitment.

McpListCommitmentReservationsRequest

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

string

Required. Project ID for this request.

region

string

Required. The region of the commitment.

name

string

Required. Identifier. Name of the commitment to look up reservations for.

Output Schema

Response message for listing reservations for a region commitment.

McpListCommitmentReservationsResponse

JSON representation
{
  "reservations": [
    {
      object (Allocation)
    }
  ]
}
Fields
reservations[]

object (Allocation)

The list of reservations.

Allocation

JSON representation
{
  "kind": string,
  "id": string,
  "creationTimestamp": string,
  "selfLink": string,
  "zone": string,
  "description": string,
  "name": string,
  "commitment": string,
  "linkedCommitments": [
    string
  ],
  "specificReservationRequired": boolean,
  "status": enum (Status),
  "shareSettings": {
    object (ShareSettings)
  },
  "satisfiesPzs": boolean,
  "resourcePolicies": {
    string: string,
    ...
  },
  "resourceStatus": {
    object (ResourceStatus)
  },
  "reservationSharingPolicy": {
    object (ReservationSharingPolicy)
  },
  "deploymentType": enum (DeploymentType),
  "advancedDeploymentControl": {
    object (AdvancedDeploymentControl)
  },
  "enableEmergentMaintenance": boolean,
  "protectionTier": enum (ProtectionTier),
  "schedulingType": enum (SchedulingType),

  // Union field type can be only one of the following:
  "specificReservation": {
    object (SpecificSKUAllocation)
  },
  "aggregateReservation": {
    object (AggregateReservation)
  }
  // End of list of possible types for union field type.

  // Union field auto_delete_time can be only one of the following:
  "deleteAtTime": string,
  "deleteAfterDuration": {
    object (Duration)
  }
  // End of list of possible types for union field auto_delete_time.
}
Fields
kind

string

Output only. [Output Only] Type of the resource. Always compute#reservations for reservations.

id

string (uint64 format)

Output only. [Output Only] The unique identifier for the resource. This identifier is defined by the server.

creationTimestamp

string

Output only. [Output Only] Creation timestamp in RFC3339 text format.

selfLink

string

Output only. [Output Only] Server-defined fully-qualified URL for this resource.

zone

string

Zone in which the reservation resides. A zone must be provided if the reservation is created within a commitment.

description

string

An optional description of this resource. Provide this property when you create the resource.

name

string

The name of the resource, provided by the client when initially creating the resource. The resource name must be 1-63 characters long, and comply with RFC1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])? which means the first character must be a lowercase letter, and all following characters must be a dash, lowercase letter, or digit, except the last character, which cannot be a dash.

commitment

string

Output only. [Output Only] Full or partial URL to a parent commitment. This field displays for reservations that are tied to a commitment.

linkedCommitments[]

string

Output only. [Output Only] Full or partial URL to parent commitments. This field displays for reservations that are tied to multiple commitments.

specificReservationRequired

boolean

Indicates whether the reservation can be consumed by VMs with affinity for "any" reservation. If the field is set, then only VMs that target the reservation by name can consume from this reservation.

status

enum (Status)

Output only. [Output Only] The status of the reservation.

  • CREATING: Reservation resources are being allocated.
  • READY: Reservation resources have been allocated, and the reservation is ready for use.
  • DELETING: Reservation deletion is in progress.
  • UPDATING: Reservation update is in progress.

shareSettings

object (ShareSettings)

Specify share-settings to create a shared reservation. This property is optional. For more information about the syntax and options for this field and its subfields, see the guide for creating a shared reservation.

satisfiesPzs

boolean

Output only. [Output Only] Reserved for future use.

resourcePolicies

map (key: string, value: string)

Resource policies to be added to this reservation. The key is defined by user, and the value is resource policy url. This is to define placement policy with reservation.

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

resourceStatus

object (ResourceStatus)

Output only. [Output Only] Status information for Reservation resource.

reservationSharingPolicy

object (ReservationSharingPolicy)

Specify the reservation sharing policy. If unspecified, the reservation will not be shared with Google Cloud managed services.

deploymentType

enum (DeploymentType)

Specifies the deployment strategy for this reservation.

advancedDeploymentControl

object (AdvancedDeploymentControl)

Advanced control for cluster management, applicable only to DENSE deployment type reservations.

enableEmergentMaintenance

boolean

Indicates whether Compute Engine allows unplanned maintenance for your VMs; for example, to fix hardware errors.

protectionTier

enum (ProtectionTier)

Protection tier for the workload which specifies the workload expectations in the event of infrastructure failures at data center (e.g. power and/or cooling failures).

schedulingType

enum (SchedulingType)

The type of maintenance for the reservation.

Union field type.

type can be only one of the following:

specificReservation

object (SpecificSKUAllocation)

Reservation for instances with specific machine shapes.

aggregateReservation

object (AggregateReservation)

Reservation for aggregated resources, providing shape flexibility.

Union field auto_delete_time.

auto_delete_time can be only one of the following:

deleteAtTime

string

Absolute time in future when the reservation will be auto-deleted by Compute Engine. Timestamp is represented in RFC3339 text format.

deleteAfterDuration

object (Duration)

Duration time relative to reservation creation when Compute Engine will automatically delete this resource.

SpecificSKUAllocation

JSON representation
{
  "instanceProperties": {
    object (AllocatedInstanceProperties)
  },
  "count": string,
  "inUseCount": string,
  "assuredCount": string,
  "sourceInstanceTemplate": string
}
Fields
instanceProperties

object (AllocatedInstanceProperties)

The instance properties for the reservation.

count

string (int64 format)

Specifies the number of resources that are allocated.

inUseCount

string (int64 format)

Output only. [Output Only] Indicates how many instances are in use.

assuredCount

string (int64 format)

Output only. [Output Only] Indicates how many instances are actually usable currently.

sourceInstanceTemplate

string

Specifies the instance template to create the reservation. If you use this field, you must exclude the instanceProperties field.

This field is optional, and it can be a full or partial URL. For example, the following are all valid URLs to an instance template:

AllocatedInstanceProperties

JSON representation
{
  "machineType": string,
  "guestAccelerators": [
    {
      object (AcceleratorConfig)
    }
  ],
  "minCpuPlatform": string,
  "localSsds": [
    {
      object (AllocatedDisk)
    }
  ],
  "locationHint": string
}
Fields
machineType

string

Specifies type of machine (name only) which has fixed number of vCPUs and fixed amount of memory. This also includes specifying custom machine type following custom-NUMBER_OF_CPUS-AMOUNT_OF_MEMORY pattern.

guestAccelerators[]

object (AcceleratorConfig)

Specifies accelerator type and count.

minCpuPlatform

string

Minimum cpu platform the reservation.

localSsds[]

object (AllocatedDisk)

Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd.

locationHint

string

An opaque location hint used to place the allocation close to other resources. This field is for use by internal tools that use the public API.

AcceleratorConfig

JSON representation
{
  "acceleratorType": string,
  "acceleratorCount": integer
}
Fields
acceleratorType

string

Full or partial URL of the accelerator type resource to attach to this instance. For example: projects/my-project/zones/us-central1-c/acceleratorTypes/nvidia-tesla-p100 If you are creating an instance template, specify only the accelerator name. See GPUs on Compute Engine for a full list of accelerator types.

acceleratorCount

integer

The number of the guest accelerator cards exposed to this instance.

AllocatedDisk

JSON representation
{
  "diskSizeGb": string,
  "interface": enum (DiskInterface)
}
Fields
diskSizeGb

string (int64 format)

Specifies the size of the disk in base-2 GB.

interface

enum (DiskInterface)

Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. For performance characteristics of SCSI over NVMe, see Local SSD performance.

AggregateReservation

JSON representation
{
  "vmFamily": enum (VMFamily),
  "reservedResources": [
    {
      object (ReservedResourceInfo)
    }
  ],
  "inUseResources": [
    {
      object (ReservedResourceInfo)
    }
  ],
  "workloadType": enum (WorkloadType)
}
Fields
vmFamily

enum (VMFamily)

The VM family that all instances scheduled against this reservation must belong to.

reservedResources[]

object (ReservedResourceInfo)

List of reserved resources (CPUs, memory, accelerators).

inUseResources[]

object (ReservedResourceInfo)

Output only. [Output only] List of resources currently in use.

workloadType

enum (WorkloadType)

The workload type of the instances that will target this reservation.

ReservedResourceInfo

JSON representation
{

  // Union field reserved_resource can be only one of the following:
  "accelerator": {
    object (Accelerator)
  }
  // End of list of possible types for union field reserved_resource.
}
Fields

Union field reserved_resource.

reserved_resource can be only one of the following:

accelerator

object (Accelerator)

Properties of accelerator resources in this reservation.

Accelerator

JSON representation
{
  "acceleratorCount": integer,
  "acceleratorType": string
}
Fields
acceleratorCount

integer

Number of accelerators of specified type.

acceleratorType

string

Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l"

Duration

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

string (int64 format)

Span of time at a resolution of a second. Must be from 0 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

Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

ShareSettings

JSON representation
{
  "shareType": enum (ShareType),
  "projectMap": {
    string: {
      object (ProjectConfig)
    },
    ...
  }
}
Fields
shareType

enum (ShareType)

Type of sharing for this shared-reservation

projectMap

map (key: string, value: object (ProjectConfig))

A map of project id and project config. This is only valid when share_type's value is SPECIFIC_PROJECTS.

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

ProjectMapEntry

JSON representation
{
  "key": string,
  "value": {
    object (ProjectConfig)
  }
}
Fields
key

string

value

object (ProjectConfig)

ProjectConfig

JSON representation
{
  "projectId": string
}
Fields
projectId

string

The project ID, should be same as the key of this project config in the parent map.

ResourcePolicyEntry

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

string

value

string

ResourceStatus

JSON representation
{
  "specificSkuAllocation": {
    object (SpecificSKUAllocation)
  },
  "reservationMaintenance": {
    object (GroupMaintenanceInfo)
  },
  "reservationBlockCount": integer,
  "healthInfo": {
    object (HealthInfo)
  }
}
Fields
specificSkuAllocation

object (SpecificSKUAllocation)

Allocation Properties of this reservation.

reservationMaintenance

object (GroupMaintenanceInfo)

Maintenance information for this reservation

reservationBlockCount

integer

The number of reservation blocks associated with this reservation.

healthInfo

object (HealthInfo)

[Output only] Health information for the reservation.

SpecificSKUAllocation

JSON representation
{
  "sourceInstanceTemplateId": string,
  "utilizations": {
    string: string,
    ...
  }
}
Fields
sourceInstanceTemplateId

string

ID of the instance template used to populate reservation properties.

utilizations

map (key: string, value: string (int64 format))

Per service utilization breakdown. The Key is the Google Cloud managed service name.

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

UtilizationEntry

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

string

value

string (int64 format)

GroupMaintenanceInfo

JSON representation
{
  "upcomingGroupMaintenance": {
    object (UpcomingMaintenance)
  },
  "maintenanceOngoingCount": integer,
  "maintenancePendingCount": integer,
  "schedulingType": enum (SchedulingType),
  "subblockInfraMaintenanceOngoingCount": integer,
  "subblockInfraMaintenancePendingCount": integer,
  "instanceMaintenanceOngoingCount": integer,
  "instanceMaintenancePendingCount": integer
}
Fields
upcomingGroupMaintenance

object (UpcomingMaintenance)

Maintenance information on this group of VMs.

maintenanceOngoingCount

integer

Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance.

maintenancePendingCount

integer

Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have pending maintenance.

schedulingType

enum (SchedulingType)

The type of maintenance for the reservation.

subblockInfraMaintenanceOngoingCount

integer

Describes number of subblock Infrastructure that has ongoing maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family(e.g. NVLink Domains). Not all VM Families will support this field.

subblockInfraMaintenancePendingCount

integer

Describes number of subblock Infrastructure that has pending maintenance. Here, Subblock Infrastructure Maintenance pertains to upstream hardware contained in the Subblock that is necessary for a VM Family (e.g. NVLink Domains). Not all VM Families will support this field.

instanceMaintenanceOngoingCount

integer

Describes number of instances that have ongoing maintenance.

instanceMaintenancePendingCount

integer

Describes number of instances that have pending maintenance.

UpcomingMaintenance

JSON representation
{
  "type": enum (MaintenanceType),
  "canReschedule": boolean,
  "windowStartTime": string,
  "windowEndTime": string,
  "latestWindowStartTime": string,
  "maintenanceStatus": enum (MaintenanceStatus),
  "maintenanceOnShutdown": boolean,
  "maintenanceReasons": [
    enum (MaintenanceReason)
  ]
}
Fields
type

enum (MaintenanceType)

Defines the type of maintenance.

canReschedule

boolean

Indicates if the maintenance can be customer triggered.

windowStartTime

string

The current start time of the maintenance window. This timestamp value is in RFC3339 text format.

windowEndTime

string

The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format.

latestWindowStartTime

string

The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format.

maintenanceStatus

enum (MaintenanceStatus)

maintenanceOnShutdown

boolean

Indicates whether the UpcomingMaintenance will be triggered on VM shutdown.

maintenanceReasons[]

enum (MaintenanceReason)

The reasons for the maintenance. Only valid for vms.

HealthInfo

JSON representation
{
  "healthStatus": enum (HealthStatus),
  "healthyBlockCount": integer,
  "degradedBlockCount": integer
}
Fields
healthStatus

enum (HealthStatus)

The health status of the reservation.

healthyBlockCount

integer

The number of reservation blocks that are healthy.

degradedBlockCount

integer

The number of reservation blocks that are degraded.

ReservationSharingPolicy

JSON representation
{
  "serviceShareType": enum (ServiceShareType)
}
Fields
serviceShareType

enum (ServiceShareType)

Sharing config for all Google Cloud services.

AdvancedDeploymentControl

JSON representation
{
  "reservationOperationalMode": enum (ReservationOperationalMode)
}
Fields
reservationOperationalMode

enum (ReservationOperationalMode)

Indicates chosen reservation operational mode for the reservation.

Tool Annotations

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