Tool: update_database
Update a Firestore database.
The following sample demonstrate how to use curl to invoke the update_database MCP tool.
| Curl Request |
|---|
curl --location 'https://firestore.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "update_database", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
The request for FirestoreAdmin.UpdateDatabase.
UpdateDatabaseRequest
| JSON representation |
|---|
{
"database": {
object ( |
| Fields | |
|---|---|
database |
Required. The database to update. |
updateMask |
The list of fields to be updated. This is a comma-separated list of fully qualified names of fields. Example: |
Database
| JSON representation |
|---|
{ "name": string, "uid": string, "createTime": string, "updateTime": string, "deleteTime": string, "locationId": string, "type": enum ( |
| Fields | |
|---|---|
name |
The resource name of the Database. Format: |
uid |
Output only. The system-generated UUID4 for this Database. |
createTime |
Output only. The timestamp at which this database was created. Databases created before 2016 do not populate create_time. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
updateTime |
Output only. The timestamp at which this database was most recently updated. Note this only includes updates to the database resource and not data contained by the database. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
deleteTime |
Output only. The timestamp at which this database was deleted. Only set if the database has been deleted. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
locationId |
The location of the database. Available locations are listed at https://cloud.google.com/firestore/docs/locations. |
type |
The type of the database. See https://cloud.google.com/datastore/docs/firestore-or-datastore for information about how to choose. |
concurrencyMode |
The concurrency control mode to use for this database. If unspecified in a CreateDatabase request, this will default based on the database edition: Optimistic for Enterprise and Pessimistic for all other databases. |
versionRetentionPeriod |
Output only. The period during which past versions of data are retained in the database. Any If the PITR feature is enabled, the retention period is 7 days. Otherwise, the retention period is 1 hour. A duration in seconds with up to nine fractional digits, ending with ' |
earliestVersionTime |
Output only. The earliest timestamp at which older versions of the data can be read from the database. See [version_retention_period] above; this field is populated with This value is continuously updated, and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
pointInTimeRecoveryEnablement |
Whether to enable the PITR feature on this database. |
appEngineIntegrationMode |
The App Engine integration mode to use for this database. |
keyPrefix |
Output only. The key_prefix for this database. This key_prefix is used, in combination with the project ID (" This value may be empty in which case the appid to use for URL-encoded keys is the project_id (eg: foo instead of v~foo). |
deleteProtectionState |
State of delete protection for the database. |
cmekConfig |
Optional. Presence indicates CMEK is enabled for this database. |
previousId |
Output only. The database resource's prior database ID. This field is only populated for deleted databases. |
sourceInfo |
Output only. Information about the provenance of this database. |
tags |
Optional. Input only. Immutable. Tag keys/values directly bound to this resource. For example: "123/environment": "production", "123/costCenter": "marketing" An object containing a list of |
etag |
This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
databaseEdition |
Immutable. The edition of the database. |
realtimeUpdatesMode |
Immutable. The default Realtime Updates mode to use for this database. |
firestoreDataAccessMode |
Optional. The Firestore API data access mode to use for this database. If not set on write: - the default value is DATA_ACCESS_MODE_DISABLED for Enterprise Edition. - the default value is DATA_ACCESS_MODE_ENABLED for Standard Edition. |
mongodbCompatibleDataAccessMode |
Optional. The MongoDB compatible API data access mode to use for this database. If not set on write, the default value is DATA_ACCESS_MODE_ENABLED for Enterprise Edition. The value is always DATA_ACCESS_MODE_DISABLED for Standard Edition. |
Union field
|
|
freeTier |
Output only. Background: Free tier is the ability of a Firestore database to use a small amount of resources every day without being charged. Once usage exceeds the free tier limit further usage is charged. Whether this database can make use of the free tier. Only one database per project can be eligible for the free tier. The first (or next) database that is created in a project without a free tier database will be marked as eligible for the free tier. Databases that are created while there is a free tier database will not be eligible for the free tier. |
Timestamp
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z. Must be between -62135596800 and 253402300799 inclusive (which corresponds to 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z). |
nanos |
Non-negative fractions of a second at nanosecond resolution. This field is the nanosecond portion of the duration, not an alternative to seconds. Negative second values with fractions must still have non-negative nanos values that count forward in time. Must be between 0 and 999,999,999 inclusive. |
Duration
| JSON representation |
|---|
{ "seconds": string, "nanos": integer } |
| Fields | |
|---|---|
seconds |
Signed seconds of the span of time. Must be from -315,576,000,000 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 |
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0 |
CmekConfig
| JSON representation |
|---|
{ "kmsKeyName": string, "activeKeyVersion": [ string ] } |
| Fields | |
|---|---|
kmsKeyName |
Required. Only keys in the same location as this database are allowed to be used for encryption. For Firestore's nam5 multi-region, this corresponds to Cloud KMS multi-region us. For Firestore's eur3 multi-region, this corresponds to Cloud KMS multi-region europe. See https://cloud.google.com/kms/docs/locations. The expected format is |
activeKeyVersion[] |
Output only. Currently in-use KMS key versions. During key rotation, there can be multiple in-use key versions. The expected format is |
SourceInfo
| JSON representation |
|---|
{ "operation": string, // Union field |
| Fields | |
|---|---|
operation |
The associated long-running operation. This field may not be set after the operation has completed. Format: |
Union field source. The source from which this database is derived. source can be only one of the following: |
|
backup |
If set, this database was restored from the specified backup (or a snapshot thereof). |
BackupSource
| JSON representation |
|---|
{ "backup": string } |
| Fields | |
|---|---|
backup |
The resource name of the backup that was used to restore this database. Format: |
TagsEntry
| JSON representation |
|---|
{ "key": string, "value": string } |
| Fields | |
|---|---|
key |
|
value |
|
FieldMask
| JSON representation |
|---|
{ "paths": [ string ] } |
| Fields | |
|---|---|
paths[] |
The set of field mask paths. |
Output Schema
This resource represents a long-running operation that is the result of a network API call.
Operation
| JSON representation |
|---|
{ "name": string, "metadata": { "@type": string, field1: ..., ... }, "done": boolean, // Union field |
| Fields | |
|---|---|
name |
The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the |
metadata |
Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. An object containing fields of an arbitrary type. An additional field |
done |
If the value is |
Union field result. The operation result, which can be either an error or a valid response. If done == false, neither error nor response is set. If done == true, exactly one of error or response can be set. Some services might not provide the result. result can be only one of the following: |
|
error |
The error result of the operation in case of failure or cancellation. |
response |
The normal, successful response of the operation. If the original method returns no data on success, such as An object containing fields of an arbitrary type. An additional field |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
Identifies the type of the serialized Protobuf message with a URI reference consisting of a prefix ending in a slash and the fully-qualified type name. Example: type.googleapis.com/google.protobuf.StringValue This string must contain at least one The prefix is arbitrary and Protobuf implementations are expected to simply strip off everything up to and including the last All type URL strings must be legal URI references with the additional restriction (for the text format) that the content of the reference must consist only of alphanumeric characters, percent-encoded escapes, and characters in the following set (not including the outer backticks): In the original design of |
value |
Holds a Protobuf serialization of the type described by type_url. A base64-encoded string. |
Status
| JSON representation |
|---|
{ "code": integer, "message": string, "details": [ { "@type": string, field1: ..., ... } ] } |
| Fields | |
|---|---|
code |
The status code, which should be an enum value of |
message |
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the |
details[] |
A list of messages that carry the error details. There is a common set of message types for APIs to use. An object containing fields of an arbitrary type. An additional field |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ❌ | Open World Hint: ❌