Skip to main content
Glama
RawTree MCP Server

RawTree MCP Server

Official
by rawtreedb

List Saved Queries

list-saved-queries
Read-onlyIdempotent

List all saved SQL queries visible to you in a cluster, across databases. Returns { queries: [...] } with each query's id, organization_id, cluster_id, user_id, name, sql, database, visibility, created_at, and updated_at.

Instructions

List all saved SQL queries visible to you in a cluster, across databases. Returns { queries: [...] } with each query's id, organization_id, cluster_id, user_id, name, sql, database, visibility, created_at, and updated_at. There is no pagination.

User sessions and OAuth can see their own private queries and cluster-shared queries. Standard API keys with read permission can see only cluster-shared queries; write-only and database-role keys are not supported.

To execute a saved query, pass its sql and database to run-query with the same organization and cluster. Listing does not execute SQL or grant access to the underlying data.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "list-saved-queries"
  }
}

Input Schema

NameRequiredDescriptionDefault
clusterNoRawTree cluster to use for this operation.
organizationNoRawTree organization containing the target cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.2

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, yet the description adds real depth: there is no pagination, the exact response envelope and field set are given, and the visibility model is broken down per auth type (user sessions/OAuth vs read API keys vs write-only/database-role keys). This is disclosure well beyond the structured annotations.

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

Conciseness4/5

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

Four sentences with the core action and return shape front-loaded, then access constraints, then the sibling hand-off. The field enumeration is long but earns its place because there is no output schema; only slight density keeps it off a 5.

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

Completeness5/5

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

With no output schema, the description supplies the return envelope and field list; with sparse annotations, it supplies the permission and pagination model. Nothing an agent needs in order to call this correctly, or to interpret the result, is missing.

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

Parameters3/5

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

Both parameters (cluster, organization) are fully documented in the schema at 100% coverage, so the baseline is 3. The description only implies their meaning ('in a cluster', 'same organization and cluster') without adding format, default, or interaction detail beyond the schema.

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 opens with a specific verb and resource plus scope: list all saved SQL queries visible to you in a cluster, across databases. It also distinguishes itself from run-query by naming what the sibling does (execution) versus what this tool does (listing only).

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 explicitly routes the agent to run-query for execution ('pass its sql and database to run-query with the same organization and cluster') and states what this tool does not do ('Listing does not execute SQL or grant access to the underlying data'). It also spells out which caller identities may use it and which auth modes are unsupported.

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