Change a database's size
Change the database's memory size, grow its storage, or both. Send size (256mb, 512mb, 1gb, 2gb, 4gb or 8gb) or memorySizeBytes for memory, and storageBytes for storage. Changing the memory restarts the database straight away, so it cannot take connections for a short time: the answer is HTTP 202 with restarting true and an operation to poll (getProjectOperation); if the new size cannot be applied, that operation fails and its errorMessage says what happened; read getDatabase for the size the database has now. The memory can change only while the database is running (HTTP 409 database_not_running otherwise), and nothing changes while other work runs on the database, such as a backup, restore, import or another resize (HTTP 409 workload_busy or conflict). Storage can only grow: a smaller amount than the database has returns HTTP 400 storage_cannot_shrink; growing it needs no restart. Every running app and database counts its size against the plan's memory (limits.ram_mb in getCapabilities), and every one counts its storage (limits.storage_gb); a size or storage that does not fit returns HTTP 409 plan_full with details.quota saying which resource ran out and how much is free. Stopping an app, or making an app or another database smaller, frees memory. A server that cannot change database sizes yet returns HTTP 409 resize_unavailable.
Clients are told this tool can remove, overwrite or interrupt resources, or grant access. Set your client to ask before it runs it.
Queued work: send an idempotencyKey and reuse the same value when retrying this exact call.
Arguments
| Name | Type | Required | Limits |
|---|---|---|---|
size | "256mb" | "512mb" | "1gb" | "2gb" | "4gb" | "8gb" | No | See schema |
memorySizeBytes | 268435456 | 536870912 | 1073741824 | 2147483648 | 4294967296 | 8589934592 | No | See schema |
storageBytes | integer | No | Minimum 1; Maximum 1125899906842624 |
projectId | string | Yes | At least 1 character(s) |
databaseId | string | Yes | At least 1 character(s) |
idempotencyKey | string | Yes | At least 1 character(s) |
Full input schema
{
"type": "object",
"properties": {
"size": {
"type": "string",
"enum": [
"256mb",
"512mb",
"1gb",
"2gb",
"4gb",
"8gb"
]
},
"memorySizeBytes": {
"type": "integer",
"enum": [
268435456,
536870912,
1073741824,
2147483648,
4294967296,
8589934592
]
},
"storageBytes": {
"type": "integer",
"minimum": 1,
"maximum": 1125899906842624
},
"projectId": {
"type": "string",
"minLength": 1
},
"databaseId": {
"type": "string",
"minLength": 1
},
"idempotencyKey": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Unique request key. Reuse this exact value when retrying the same operation."
}
},
"required": [
"projectId",
"databaseId",
"idempotencyKey"
],
"additionalProperties": false
}Example call
The params of a tools/call request. Replace the placeholder values with your own IDs.
{
"name": "resizeDatabase",
"arguments": {
"projectId": "REPLACE_WITH_PROJECT_ID",
"databaseId": "REPLACE_WITH_DATABASE_ID",
"idempotencyKey": "REPLACE_WITH_IDEMPOTENCY_KEY"
}
} Result
The same data as the API operation, wrapped as {"untrusted_data": true, "source": "resizeDatabase", "note": "...", "data": ...} so the model treats project content as data, not instructions.