Tool: get_reservation_details
Get Compute Engine reservation details. 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, zone, and reservation name as input.
The following sample demonstrate how to use curl
to invoke the get_reservation_details
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_reservation_details", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
Request message for getting reservation details.
McpGetReservationDetailsRequest
| JSON representation |
|---|
{ "project" : string , "zone" : string , "name" : string } |
| Fields | |
|---|---|
project
|
Required. Project ID for this request. |
zone
|
Required. The zone of the reservation. |
name
|
Required. Identifier. Name of the reservation to retrieve. |
Output Schema
Represents a reservation resource. A reservation ensures that capacity is held in a specific zone even if the reserved VMs are not running. For more information, read Reserving zonal resources .
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 ( |
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 (
|
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:
-
https://www.googleapis.com/compute/v1/projects/ project /global/instanceTemplates/ instanceTemplate -
projects/ project /global/instanceTemplates/ instanceTemplate -
global/instanceTemplates/ instanceTemplate
AllocatedInstanceProperties
| JSON representation |
|---|
{ "machineType" : string , "guestAccelerators" : [ { object ( |
| Fields | |
|---|---|
machineType
|
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[]
|
Specifies accelerator type and count. |
minCpuPlatform
|
Minimum cpu platform the reservation. |
localSsds[]
|
Specifies amount of local ssd to reserve with each instance. The type of disk is local-ssd. |
locationHint
|
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
|
Full or partial URL of the accelerator type resource to attach to this instance. For example: |
acceleratorCount
|
The number of the guest accelerator cards exposed to this instance. |
AllocatedDisk
| JSON representation |
|---|
{
"diskSizeGb"
:
string
,
"interface"
:
enum (
|
| Fields | |
|---|---|
diskSizeGb
|
Specifies the size of the disk in base-2 GB. |
interface
|
Specifies the disk interface to use for attaching this disk, which is either |
AggregateReservation
| JSON representation |
|---|
{ "vmFamily" : enum ( |
| Fields | |
|---|---|
vmFamily
|
The VM family that all instances scheduled against this reservation must belong to. |
reservedResources[]
|
List of reserved resources (CPUs, memory, accelerators). |
inUseResources[]
|
Output only. [Output only] List of resources currently in use. |
workloadType
|
The workload type of the instances that will target this reservation. |
ReservedResourceInfo
| JSON representation |
|---|
{ // Union field |
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
|
Number of accelerators of specified type. |
acceleratorType
|
Full or partial URL to accelerator type. e.g. "projects/{PROJECT}/zones/{ZONE}/acceleratorTypes/ct4l" |
Duration
| JSON representation |
|---|
{ "seconds" : string , "nanos" : integer } |
| Fields | |
|---|---|
seconds
|
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
|
Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 |
| JSON representation |
|---|
{ "shareType" : enum ( |
| Fields | |
|---|---|
shareType
|
Type of sharing for this shared-reservation |
projectMap
|
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 |
ProjectMapEntry
| JSON representation |
|---|
{
"key"
:
string
,
"value"
:
{
object (
|
| Fields | |
|---|---|
key
|
|
value
|
|
ProjectConfig
| JSON representation |
|---|
{ "projectId" : string } |
| Fields | |
|---|---|
projectId
|
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
|
|
value
|
|
ResourceStatus
| JSON representation |
|---|
{ "specificSkuAllocation" : { object ( |
| Fields | |
|---|---|
specificSkuAllocation
|
Allocation Properties of this reservation. |
reservationMaintenance
|
Maintenance information for this reservation |
reservationBlockCount
|
The number of reservation blocks associated with this reservation. |
healthInfo
|
[Output only] Health information for the reservation. |
SpecificSKUAllocation
| JSON representation |
|---|
{ "sourceInstanceTemplateId" : string , "utilizations" : { string : string , ... } } |
| Fields | |
|---|---|
sourceInstanceTemplateId
|
ID of the instance template used to populate reservation properties. |
utilizations
|
Per service utilization breakdown. The Key is the Google Cloud managed service name. An object containing a list of |
UtilizationEntry
| JSON representation |
|---|
{ "key" : string , "value" : string } |
| Fields | |
|---|---|
key
|
|
value
|
|
GroupMaintenanceInfo
| JSON representation |
|---|
{ "upcomingGroupMaintenance" : { object ( |
| Fields | |
|---|---|
upcomingGroupMaintenance
|
Maintenance information on this group of VMs. |
maintenanceOngoingCount
|
Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have ongoing maintenance. |
maintenancePendingCount
|
Progress for ongoing maintenance for this group of VMs/hosts. Describes number of hosts in the block that have pending maintenance. |
schedulingType
|
The type of maintenance for the reservation. |
subblockInfraMaintenanceOngoingCount
|
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
|
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
|
Describes number of instances that have ongoing maintenance. |
instanceMaintenancePendingCount
|
Describes number of instances that have pending maintenance. |
UpcomingMaintenance
| JSON representation |
|---|
{ "type" : enum ( |
| Fields | |
|---|---|
type
|
Defines the type of maintenance. |
canReschedule
|
Indicates if the maintenance can be customer triggered. |
windowStartTime
|
The current start time of the maintenance window. This timestamp value is in RFC3339 text format. |
windowEndTime
|
The time by which the maintenance disruption will be completed. This timestamp value is in RFC3339 text format. |
latestWindowStartTime
|
The latest time for the planned maintenance window to start. This timestamp value is in RFC3339 text format. |
maintenanceStatus
|
|
maintenanceOnShutdown
|
Indicates whether the UpcomingMaintenance will be triggered on VM shutdown. |
maintenanceReasons[]
|
The reasons for the maintenance. Only valid for vms. |
HealthInfo
| JSON representation |
|---|
{
"healthStatus"
:
enum (
|
| Fields | |
|---|---|
healthStatus
|
The health status of the reservation. |
healthyBlockCount
|
The number of reservation blocks that are healthy. |
degradedBlockCount
|
The number of reservation blocks that are degraded. |
ReservationSharingPolicy
| JSON representation |
|---|
{
"serviceShareType"
:
enum (
|
| Fields | |
|---|---|
serviceShareType
|
Sharing config for all Google Cloud services. |
AdvancedDeploymentControl
| JSON representation |
|---|
{
"reservationOperationalMode"
:
enum (
|
| Fields | |
|---|---|
reservationOperationalMode
|
Indicates chosen reservation operational mode for the reservation. |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ✅ | Read Only Hint: ✅ | Open World Hint: ❌

