Tool: list_instances
List all Cloud SQL instances in the project.
The following sample demonstrate how to use curl
to invoke the list_instances
MCP tool.
| Curl Request |
|---|
curl --location 'https://sqladmin.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "list_instances", "arguments": { // provide these details according to the tool' s MCP specification } } , "jsonrpc" : "2.0" , "id" : 1 } ' |
Input Schema
Instance list request.
SqlInstancesListRequest
| JSON representation |
|---|
{ "filter" : string , "maxResults" : integer , "pageToken" : string , "project" : string } |
| Fields | |
|---|---|
filter
|
A filter expression that filters resources listed in the response. The expression is in the form of field:value. For example, 'instanceType:CLOUD_SQL_INSTANCE'. Fields can be nested as needed as per their JSON representation, such as 'settings.userLabels.auto_start:true'. Multiple filter queries are space-separated. For example. 'state:RUNNABLE instanceType:CLOUD_SQL_INSTANCE'. By default, each expression is an AND expression. However, you can include AND and OR expressions explicitly. |
maxResults
|
The maximum number of instances to return. The service may return fewer than this value. If unspecified, at most 500 instances are returned. The maximum value is 1000; values above 1000 are coerced to 1000. |
pageToken
|
A previously-returned page token representing part of the larger set of results to view. |
project
|
Project ID of the project for which to list Cloud SQL instances. |
Output Schema
Instance list response for MCP.
SqlInstancesListMcpResponse
| JSON representation |
|---|
{ "kind" : string , "warnings" : [ { object ( |
| Fields | |
|---|---|
kind
|
This is always sql#instancesList. |
warnings[]
|
List of warnings that occurred while handling the request. |
items[]
|
List of mcp instance resources. |
nextPageToken
|
The continuation token, used to page through large result sets. Provide this value in a subsequent request to return the next page of results. |
ApiWarning
| JSON representation |
|---|
{
"code"
:
enum (
|
| Fields | |
|---|---|
code
|
Code to uniquely identify the warning type. |
message
|
The warning message. |
region
|
The region name for REGION_UNREACHABLE warning. |
McpDatabaseInstance
| JSON representation |
|---|
{
"project"
:
string
,
"name"
:
string
,
"databaseVersion"
:
string
,
"region"
:
string
,
"edition"
:
string
,
"tier"
:
string
,
"dataDiskSizeGb"
:
string
,
"availabilityType"
:
string
,
"tags"
:
{
string
:
string
,
...
}
,
"state"
:
enum (
|
| Fields | |
|---|---|
project
|
Required. Project ID of the project for which to list Cloud SQL instances. |
name
|
Required. Name of the Cloud SQL instance. This does not include the project ID. |
databaseVersion
|
|
region
|
Optional. The geographical region of the Cloud SQL instance. For example, |
edition
|
Optional. The edition of the instance, can be ENTERPRISE or ENTERPRISE_PLUS. |
tier
|
Optional. The tier (or machine type) for this instance. |
dataDiskSizeGb
|
Optional. Data disk size in GB. Default value is 100. |
availabilityType
|
Optional. Availability type. Potential values: * |
tags
|
Optional. Input only. Tag keys and tag values that are bound to this instance. An object containing a list of |
state
|
Output only. State of the Cloud SQL instance. |
Int64Value
| JSON representation |
|---|
{ "value" : string } |
| Fields | |
|---|---|
value
|
The int64 value. |
TagsEntry
| JSON representation |
|---|
{ "key" : string , "value" : string } |
| Fields | |
|---|---|
key
|
|
value
|
|
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ✅ | Open World Hint: ❌

