Skip to main content
Glama
rawtreedb

RawTree MCP Server

Official
by rawtreedb

Update Table

update-table
Idempotent

Purpose: Change the sorting key of an existing RawTree table.

Instructions

Purpose: Change the sorting key of an existing RawTree table.

NOT for: Renaming a table, adding columns, or changing storage. Only the sorting key can be updated.

Returns: The database and table names plus the new sorting key.

Behavior: Provide a comma-separated SQL expression string in key order, lowest cardinality first. A bare name such as user.id is read as a path into the ingested JSON. The new key applies to newly inserted parts and wins later merges, so existing parts are re-sorted in the background instead of being rewritten by this call. Call describe-table first to see the current key.

Limits: The key must contain at least one expression; a table's sorting key cannot be removed once set. RawTree validates the SQL expressions and the engine may reject an unusable key.

Auth: Requires organization admin access. Authorization is enforced by the RawTree API.

Safety: You MUST confirm the exact table name and sorting expression order with the user before calling this tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tableYesTable name to update.
clusterNoRawTree cluster to use for this operation.
databaseNoOptional RawTree database override. RawTree uses the default database when omitted.
sortingKeyYesComma-separated SQL sorting expressions in key order, for example "region, ifNull(cityHash64(host, instanceId), 0)". A bare name such as "user.id" is read as a path into the ingested JSON.
organizationNoRawTree organization containing the target cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.2

TDQS

Score is being calculated.