Tool: get_table
Get metadata information about the specified table. The request requires the 'name' field to be set in the format 'projects/{project}/instances/{instance}/tables/{table}'. Example: { "name": "projects/my-project/instances/my-instance/tables/my-table" }
The following sample demonstrate how to use curl to invoke the get_table MCP tool.
| Curl Request |
|---|
curl --location 'https://bigtableadmin.googleapis.com/mcp' \ --header 'content-type: application/json' \ --header 'accept: application/json, text/event-stream' \ --data '{ "method": "tools/call", "params": { "name": "get_table", "arguments": { // provide these details according to the tool's MCP specification } }, "jsonrpc": "2.0", "id": 1 }' |
Input Schema
Request message for google.bigtable.admin.v2.BigtableTableAdmin.GetTable
GetTableRequest
| JSON representation |
|---|
{
"name": string,
"view": enum ( |
| Fields | |
|---|---|
name |
Required. The unique name of the requested table. Values are of the form |
view |
The view to be applied to the returned table's fields. Defaults to |
Output Schema
A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster.
Table
| JSON representation |
|---|
{ "name": string, "clusterStates": { string: { object ( |
| Fields | |
|---|---|
name |
The unique name of the table. Values are of the form |
clusterStates |
Output only. Map from cluster ID to per-cluster table state. If it could not be determined whether or not the table has data in a particular cluster (for example, if its zone is unavailable), then there will be an entry for the cluster with UNKNOWN An object containing a list of |
columnFamilies |
The column families configured for this table, mapped by column family ID. Views: An object containing a list of |
granularity |
Immutable. The granularity (i.e. |
restoreInfo |
Output only. If this table was restored from another data source (e.g. a backup), this field will be populated with information about the restore. |
changeStreamConfig |
If specified, enable the change stream on this table. Otherwise, the change stream is disabled and the change stream is not retained. |
deletionProtection |
Set to true to make the table protected against data loss. i.e. deleting the following resources through Admin APIs are prohibited:
Note one can still delete the data stored in the table through Data APIs. |
stats |
Output only. Only available with STATS_VIEW, this includes summary statistics about the entire table contents. For statistics about a specific column family, see ColumnFamilyStats in the mapped ColumnFamily collection above. |
tieredStorageConfig |
Rules to specify what data is stored in each storage tier. Different tiers store data differently, providing different trade-offs between cost and performance. Different parts of a table can be stored separately on different tiers. If a config is specified, tiered storage is enabled for this table. Otherwise, tiered storage is disabled. Only SSD instances can configure tiered storage. |
rowKeySchema |
The row key schema for this table. The schema is used to decode the raw row key bytes into a structured format. The order of field declarations in this schema is important, as it reflects how the raw row key bytes are structured. Currently, this only affects how the key is read via a GoogleSQL query from the ExecuteQuery API. For a SQL query, the _key column is still read as raw bytes. But queries can reference the key fields by name, which will be decoded from _key using provided type and encoding. Queries that reference key fields will fail if they encounter an invalid row key. For example, if _key = "some_id#2024-04-30#\x00\x13\x00\xf3" with the following schema: { fields { field_name: "id" type { string { encoding: utf8_bytes {} } } } fields { field_name: "date" type { string { encoding: utf8_bytes {} } } } fields { field_name: "product_code" type { int64 { encoding: big_endian_bytes {} } } } encoding { delimited_bytes { delimiter: "#" } } } The decoded key parts would be: id = "some_id", date = "2024-04-30", product_code = 1245427 The query "SELECT _key, product_code FROM table" will return two columns: /------------------------------------------------------\ | _key | product_code | | --------------------------------------|--------------| | "some_id#2024-04-30#\x00\x13\x00\xf3" | 1245427 | ------------------------------------------------------/ The schema has the following invariants: (1) The decoded field values are order-preserved. For read, the field values will be decoded in sorted mode from the raw bytes. (2) Every field in the schema must specify a non-empty name. (3) Every field must specify a type with an associated encoding. The type is limited to scalar types only: Array, Map, Aggregate, and Struct are not allowed. (4) The field names must not collide with existing column family names and reserved keywords "_key" and "_timestamp". The following update operations are allowed for row_key_schema: - Update from an empty schema to a new schema. - Remove the existing schema. This operation requires setting the |
Union field
|
|
automatedBackupPolicy |
If specified, automated backups are enabled for this table. Otherwise, automated backups are disabled. |
ClusterStatesEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
ClusterState
| JSON representation |
|---|
{ "replicationState": enum ( |
| Fields | |
|---|---|
replicationState |
Output only. The state of replication for the table in this cluster. |
encryptionInfo[] |
Output only. The encryption information for the table in this cluster. If the encryption key protecting this resource is customer managed, then its version can be rotated in Cloud Key Management Service (Cloud KMS). The primary version of the key and its status will be reflected here when changes propagate from Cloud KMS. |
EncryptionInfo
| JSON representation |
|---|
{ "encryptionType": enum ( |
| Fields | |
|---|---|
encryptionType |
Output only. The type of encryption used to protect this resource. |
encryptionStatus |
Output only. The status of encrypt/decrypt calls on underlying data for this resource. Regardless of status, the existing data is always encrypted at rest. |
kmsKeyVersion |
Output only. The version of the Cloud KMS key specified in the parent cluster that is in use for the data underlying this table. |
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 |
Any
| JSON representation |
|---|
{ "typeUrl": string, "value": string } |
| Fields | |
|---|---|
typeUrl |
A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at least one "/" character. The last segment of the URL's path must represent the fully qualified name of the type (as in In practice, teams usually precompile into the binary all types that they expect it to use in the context of Any. However, for URLs which use the scheme
Note: this functionality is not currently available in the official protobuf release, and it is not used for type URLs beginning with type.googleapis.com. As of May 2023, there are no widely used type server implementations and no plans to implement one. Schemes other than |
value |
Must be a valid serialized protocol buffer of the above specified type. A base64-encoded string. |
ColumnFamiliesEntry
| JSON representation |
|---|
{
"key": string,
"value": {
object ( |
| Fields | |
|---|---|
key |
|
value |
|
ColumnFamily
| JSON representation |
|---|
{ "gcRule": { object ( |
| Fields | |
|---|---|
gcRule |
Garbage collection rule specified as a protobuf. Must serialize to at most 500 bytes. NOTE: Garbage collection executes opportunistically in the background, and so it's possible for reads to return a cell even if it matches the active GC expression for its family. |
stats |
Output only. Only available with STATS_VIEW, this includes summary statistics about column family contents. For statistics over an entire table, see TableStats above. |
valueType |
The type of data stored in each of this family's cell values, including its full encoding. If omitted, the family only serves raw untyped bytes. For now, only the
This field is mutually exclusive with If |
GcRule
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field rule. Garbage collection rules. rule can be only one of the following: |
|
maxNumVersions |
Delete all cells in a column except the most recent N. |
maxAge |
Delete cells in a column older than the given age. Values must be at least one millisecond, and will be truncated to microsecond granularity. A duration in seconds with up to nine fractional digits, ending with ' |
intersection |
Delete cells that would be deleted by every nested rule. |
union |
Delete cells that would be deleted by any nested rule. |
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 |
Intersection
| JSON representation |
|---|
{
"rules": [
{
object ( |
| Fields | |
|---|---|
rules[] |
Only delete cells which would be deleted by every element of |
Union
| JSON representation |
|---|
{
"rules": [
{
object ( |
| Fields | |
|---|---|
rules[] |
Delete cells which would be deleted by any element of |
ColumnFamilyStats
| JSON representation |
|---|
{ "averageColumnsPerRow": number, "averageCellsPerColumn": number, "logicalDataBytes": string } |
| Fields | |
|---|---|
averageColumnsPerRow |
How many column qualifiers are present in this column family, averaged over all rows in the table. e.g. For column family "family" in a table with 3 rows:
would report (1 + 2 + 0)/3 = 1.5 in this field. |
averageCellsPerColumn |
How many cells are present per column qualifier in this column family, averaged over all rows containing any column in the column family. e.g. For column family "family" in a table with 3 rows:
would report (3 + 8 + 0)/(1 + 2 + 0) = 3.66 in this field. |
logicalDataBytes |
How much space the data in the column family occupies. This is roughly how many bytes would be needed to read the contents of the entire column family (e.g. by streaming all contents out). |
Type
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field kind. The kind of type that this represents. kind can be only one of the following: |
|
bytesType |
Bytes |
stringType |
String |
int64Type |
Int64 |
float32Type |
Float32 |
float64Type |
Float64 |
boolType |
Bool |
timestampType |
Timestamp |
dateType |
Date |
aggregateType |
Aggregate |
structType |
Struct |
arrayType |
Array |
mapType |
Map |
protoType |
Proto |
enumType |
Enum |
geographyType |
Geography |
Bytes
| JSON representation |
|---|
{
"encoding": {
object ( |
| Fields | |
|---|---|
encoding |
The encoding to use when converting to or from lower level types. |
Encoding
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field encoding. Which encoding to use. encoding can be only one of the following: |
|
raw |
Use |
Raw
| JSON representation |
|---|
{ "escapeNulls": boolean } |
| Fields | |
|---|---|
escapeNulls |
If set, allows NULL values to be encoded as the empty string "". The actual empty string, or any value which only contains the null byte |
String
| JSON representation |
|---|
{
"encoding": {
object ( |
| Fields | |
|---|---|
encoding |
The encoding to use when converting to or from lower level types. |
Encoding
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field encoding. Which encoding to use. encoding can be only one of the following: |
|
utf8Raw |
Deprecated: if set, converts to an empty |
utf8Bytes |
Use |
Utf8Bytes
| JSON representation |
|---|
{ "nullEscapeChar": string } |
| Fields | |
|---|---|
nullEscapeChar |
Single-character escape sequence used to support NULL values. If set, allows NULL values to be encoded as the empty string "". The actual empty string, or any value where every character equals If . |
Int64
| JSON representation |
|---|
{
"encoding": {
object ( |
| Fields | |
|---|---|
encoding |
The encoding to use when converting to or from lower level types. |
Encoding
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field encoding. Which encoding to use. encoding can be only one of the following: |
|
bigEndianBytes |
Use |
orderedCodeBytes |
Use |
BigEndianBytes
| JSON representation |
|---|
{
"bytesType": {
object ( |
| Fields | |
|---|---|
bytesType |
Deprecated: ignored if set. |
Timestamp
| JSON representation |
|---|
{
"encoding": {
object ( |
| Fields | |
|---|---|
encoding |
The encoding to use when converting to or from lower level types. |
Encoding
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field encoding. Which encoding to use. encoding can be only one of the following: |
|
unixMicrosInt64 |
Encodes the number of microseconds since the Unix epoch using the given Compatible with:
|
Aggregate
| JSON representation |
|---|
{ "inputType": { object ( |
| Fields | |
|---|---|
inputType |
Type of the inputs that are accumulated by this |
stateType |
Output only. Type that holds the internal accumulator state for the |
Union field aggregator. Which aggregator function to use. The configured types must match. aggregator can be only one of the following: |
|
sum |
Sum aggregator. |
hllppUniqueCount |
HyperLogLogPlusPlusUniqueCount aggregator. |
max |
Max aggregator. |
min |
Min aggregator. |
Struct
| JSON representation |
|---|
{ "fields": [ { object ( |
| Fields | |
|---|---|
fields[] |
The names and types of the fields in this struct. |
encoding |
The encoding to use when converting to or from lower level types. |
Field
| JSON representation |
|---|
{
"fieldName": string,
"type": {
object ( |
| Fields | |
|---|---|
fieldName |
The field name (optional). Fields without a |
type |
The type of values in this field. |
Encoding
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field encoding. Which encoding to use. encoding can be only one of the following: |
|
singleton |
Use |
delimitedBytes |
Use |
orderedCodeBytes |
User |
DelimitedBytes
| JSON representation |
|---|
{ "delimiter": string } |
| Fields | |
|---|---|
delimiter |
Byte sequence used to delimit concatenated fields. The delimiter must contain at least 1 character and at most 50 characters. A base64-encoded string. |
Array
| JSON representation |
|---|
{
"elementType": {
object ( |
| Fields | |
|---|---|
elementType |
The type of the elements in the array. This must not be |
Map
| JSON representation |
|---|
{ "keyType": { object ( |
| Fields | |
|---|---|
keyType |
The type of a map key. Only |
valueType |
The type of the values in a map. |
Proto
| JSON representation |
|---|
{ "schemaBundleId": string, "messageName": string } |
| Fields | |
|---|---|
schemaBundleId |
The ID of the schema bundle that this proto is defined in. |
messageName |
The fully qualified name of the protobuf message, including package. In the format of "foo.bar.Message". |
Enum
| JSON representation |
|---|
{ "schemaBundleId": string, "enumName": string } |
| Fields | |
|---|---|
schemaBundleId |
The ID of the schema bundle that this enum is defined in. |
enumName |
The fully qualified name of the protobuf enum message, including package. In the format of "foo.bar.EnumMessage". |
RestoreInfo
| JSON representation |
|---|
{ "sourceType": enum ( |
| Fields | |
|---|---|
sourceType |
The type of the restore source. |
Union field source_info. Information about the source used to restore the table. source_info can be only one of the following: |
|
backupInfo |
Information about the backup used to restore the table. The backup may no longer exist. |
BackupInfo
| JSON representation |
|---|
{ "backup": string, "startTime": string, "endTime": string, "sourceTable": string, "sourceBackup": string } |
| Fields | |
|---|---|
backup |
Output only. Name of the backup. |
startTime |
Output only. The time that the backup was started. Row data in the backup will be no older than this timestamp. 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: |
endTime |
Output only. This time that the backup was finished. Row data in the backup will be no newer than this timestamp. 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: |
sourceTable |
Output only. Name of the table the backup was created from. |
sourceBackup |
Output only. Name of the backup from which this backup was copied. If a backup is not created by copying a backup, this field will be empty. Values are of the form: projects/ |
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. |
ChangeStreamConfig
| JSON representation |
|---|
{ "retentionPeriod": string } |
| Fields | |
|---|---|
retentionPeriod |
How long the change stream should be retained. Change stream data older than the retention period will not be returned when reading the change stream from the table. Values must be at least 1 day and at most 7 days, and will be truncated to microsecond granularity. A duration in seconds with up to nine fractional digits, ending with ' |
TableStats
| JSON representation |
|---|
{ "rowCount": string, "averageColumnsPerRow": number, "averageCellsPerColumn": number, "logicalDataBytes": string } |
| Fields | |
|---|---|
rowCount |
How many rows are in the table. |
averageColumnsPerRow |
How many (column family, column qualifier) combinations are present per row in the table, averaged over all rows in the table. e.g. A table with 2 rows:
would report (2 + 3)/2 = 2.5 in this field. |
averageCellsPerColumn |
How many cells are present per column (column family, column qualifier) combinations, averaged over all columns in all rows in the table. e.g. A table with 2 rows:
would report (4 + 15)/(2 + 3) = 3.8 in this field. |
logicalDataBytes |
This is roughly how many bytes would be needed to read the entire table (e.g. by streaming all contents out). |
AutomatedBackupPolicy
| JSON representation |
|---|
{ "retentionPeriod": string, "frequency": string } |
| Fields | |
|---|---|
retentionPeriod |
Required. How long the automated backups should be retained. Values must be at least 3 days and at most 90 days. A duration in seconds with up to nine fractional digits, ending with ' |
frequency |
How frequently automated backups should occur. The only supported value at this time is 24 hours. An undefined frequency is treated as 24 hours. A duration in seconds with up to nine fractional digits, ending with ' |
TieredStorageConfig
| JSON representation |
|---|
{
"infrequentAccess": {
object ( |
| Fields | |
|---|---|
infrequentAccess |
Rule to specify what data is stored in the infrequent access(IA) tier. The IA tier allows storing more data per node with reduced performance. |
TieredStorageRule
| JSON representation |
|---|
{ // Union field |
| Fields | |
|---|---|
Union field rule. Rules to specify what data is stored in this tier. rule can be only one of the following: |
|
includeIfOlderThan |
Include cells older than the given age. For the infrequent access tier, this value must be at least 30 days. A duration in seconds with up to nine fractional digits, ending with ' |
Tool Annotations
Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ✅ | Open World Hint: ✅