Tool: create_instance
Create a new Google Compute Engine virtual machine (VM) instance. Requires project, zone, and instance name as input. If machine_type is not provided, it defaults to e2-medium
. If image_project and image_family are not provided, it defaults to debian-12
image from debian-cloud
project. guest_accelerator and maintenance_policy can be optionally provided. Proceed only if there is no error in response and the status of the operation is DONE
without any errors. To get details of the operation, use the get_zone_operation
tool.
The following sample demonstrate how to use curl
to invoke the create_instance
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": "create_instance", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
Request message for creating an instance.
McpCreateInstanceRequest
| JSON representation |
|---|
{ "project" : string , "zone" : string , "name" : string , "machineType" : string , "imageFamily" : string , "imageProject" : string , "guestAccelerators" : [ { object ( |
| Fields | |
|---|---|
project
|
Required. Project ID for this request. |
zone
|
Required. The zone of the instance. |
name
|
Required. Identifier. The instance name. |
machineType
|
Optional. The machine type of the instance. |
imageFamily
|
Optional. The image family of the instance. |
imageProject
|
Optional. The image project of the instance. |
guestAccelerators[]
|
Optional. The list of attached accelerators. Each entry specifies the accelerator type (short name or full/partial URL, e.g., 'nvidia-tesla-p4') and the count. |
maintenancePolicy
|
Optional. The maintenance policy option for the instance. |
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. |
Output Schema
Response message for creating an instance.
McpCreateInstanceResponse
| JSON representation |
|---|
{ "operationName" : string } |
| Fields | |
|---|---|
operationName
|
The operation name of the instance creation. |
Tool Annotations
Destructive Hint: ✅ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌

