Skip to main content
Glama
rawtreedb

RawTree MCP Server

Official
by rawtreedb

Save Query

save-query
Destructive

Save SQL for reuse without executing it. Omit id to create a query; name, sql, and database are required. Visibility defaults to private. Supply id to update an existing query, with at least one of name, sql, database, or visibility.

Instructions

Save SQL for reuse without executing it. Omit id to create a query; name, sql, and database are required. Visibility defaults to private. Supply id to update an existing query, with at least one of name, sql, database, or visibility. Omitted fields remain unchanged; null is invalid. Use the id returned by list-saved-queries or a previous save-query call.

Requires a user session or OAuth; API keys are not supported. The authenticated user owns new queries and can update only their own queries. Set visibility to cluster to share the definition with cluster members. Returns the saved query: id, organization_id, cluster_id, user_id, name, sql, database, visibility, created_at, and updated_at.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoExisting query ID to update. Omit to create.
sqlNoSQL to save without executing. Required when creating.
nameNoQuery name. Required when creating.
clusterNoRawTree cluster to use for this operation.
databaseNoDatabase stored with the query. Required when creating; omit on update to keep the saved database.
visibilityNoprivate (default on create) or shared with the cluster. Omit on update to preserve visibility.
organizationNoRawTree organization containing the target cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.2

TDQS

Score is being calculated.