Skip to main content
Glama
RawTree MCP Server

RawTree MCP Server

Official
by rawtreedb

Update Table

update-table
DestructiveIdempotent

Change an existing RawTree table's sorting key, row-deletion TTL, or engine settings safely. Confirm the table and configuration changes before applying them.

Instructions

Purpose: Change the sorting key, row-deletion TTL, or engine settings of an existing RawTree table.

NOT for: Renaming a table, adding columns, or changing storage.

Returns: The database and table names plus current sorting_key, ttl (stored expression or null), and settings (explicit {name, value} entries with SQL values and secrets masked by the engine).

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.

Configuration: Provide exactly one of sortingKey, ttl, or nonempty settings per call. Omitted fields and setting names remain unchanged. ttl sets or replaces row-deletion retention; null and empty strings cannot remove it. settings changes supplied engine settings using literal scalar values; this route cannot reset settings.

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

Safety: You MUST confirm the exact table name and configuration changes with the user before calling this tool. TTL can delete data.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "table": "<table>"
    },
    "name": "update-table"
  }
}

Input Schema

NameRequiredDescriptionDefault
ttlNoRow-deletion TTL SQL expression, optionally followed by DELETE WHERE <condition>. Subqueries and other TTL actions are unsupported. Omit to leave unchanged on update; null and empty strings cannot remove TTL.
tableYesTable name to update.
clusterNoRawTree cluster to use for this operation.
databaseNoOptional RawTree database override. RawTree uses the default database when omitted.
settingsNoEngine settings as JSON scalar values. Strings are literal values, not SQL expressions. Updates change supplied settings only; omitted settings are preserved. This route cannot reset settings.
sortingKeyNoComma-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. Changed3 schema fields changedv0.4.9
    • addedInput schema / properties / settings
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "type": "boolean"
      +      }
      +    ]
      +  },
      +  "description": "Engine settings as JSON scalar values. Strings are literal values, not SQL expressions. Updates change supplied settings only; omitted settings are preserved. This route cannot reset settings.",
      +  "propertyNames": {
      +    "pattern": "^[A-Za-z_][A-Za-z0-9_]*$",
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / ttl
      Added value: +{
      +  "description": "Row-deletion TTL SQL expression, optionally followed by DELETE WHERE <condition>. Subqueries and other TTL actions are unsupported. Omit to leave unchanged on update; null and empty strings cannot remove TTL.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "table",
      -  "sortingKey"
      -]New value: +[
      +  "table"
      +]
  2. Addedv0.4.2

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The annotations already flag readOnlyHint=false and destructiveHint=true, and the description adds real context: existing parts are re-sorted in the background rather than rewritten, existing parts keep the old key until merged, a sorting key cannot be removed afterward, TTL expressions cannot be cleared with null or empty strings, this route cannot reset settings, and organization admin access is required. The only gap is that it does not say what the response looks like beyond the listed fields (already summarized under 'Returns') or whether permission errors surface distinctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Headings (Purpose/Returns/Behavior/Limits/Configuration/Auth/Safety) make it easy to scan and the disclaimers are front-loaded, but several facts repeat the schema verbatim, such as the ttl null and empty-string caveat appearing in both the description and the ttl parameter description. Some sentences repeat points made elsewhere: 'cannot reset settings' appears twice, and 'cannot be removed once set' appears twice.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the return values even though no output schema exists, and it explains limits, configuration rules, auth, and safety, which is enough for an agent to call the tool correctly. More detail on actual error conditions and supported engine settings would make it fully complete, but the essential information is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already defines all seven parameters. The description adds meaning the schema does not capture: the mutual-exclusivity rule for sortingKey/ttl/settings, the ordering rule for sorting keys (lowest cardinality first), and the note that a bare name such as user.id is read as a path into the ingested JSON. It stops short of documenting cluster or organization parameters, but the schema covers those.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource and enumerates exactly what can change (sorting key, row-deletion TTL, engine settings), then explicitly excludes renaming, adding columns, and changing storage. That makes update-table clearly distinguishable from create-table and delete-table.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives an explicit 'NOT for' list and directs the agent to call describe-table first to see the current key, then states a strict selection rule: provide exactly one of sortingKey, ttl, or nonempty settings per call. The conditions that separate this tool from its siblings are stated, not inferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.