Skip to main content
Glama
RawTree MCP Server

RawTree MCP Server

Official
by rawtreedb

Format Query

query-format
Read-onlyIdempotent

Format complete SQL with the native RawTree formatter without executing statements or writing database query logs. Supports multiple statements and preserves literals.

Instructions

Format complete SQL with the native RawTree formatter without executing statements or writing database query logs. Supports multiple statements and preserves literals. Inline INSERT VALUES data is copied verbatim without completeness or schema validation.

Returns JSON { "formatted": "..." } containing the entire formatted SQL. The API allows a 50 MiB JSON request, 100 MiB formatted output, and 30 seconds of formatting. Requires a backend with POST /v1/query-format.

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": {
      "sql": "<sql>"
    },
    "name": "query-format"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesComplete SQL document to format.
clusterNoRawTree cluster to use for this operation.
databaseNoOptional RawTree database override. RawTree uses the default database when omitted.
organizationNoRawTree organization containing the target cluster.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.4.2

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent/destructive annotations: it discloses concrete limits (50 MiB request, 100 MiB output, 30 second timeout), that no query logs are written, that multiple statements are supported, that literals are preserved, and that inline INSERT VALUES are copied verbatim with no completeness or schema validation. These are exactly the failure modes an agent needs to anticipate.

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?

Front-loaded with purpose and non-behavior, then the return shape, then limits. Nearly every sentence carries distinct information, though the limits/dependency sentence is dense enough that it borders on overloading a short two-paragraph block.

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?

No output schema exists, and the description supplies the return shape explicitly with `Returns JSON { "formatted": "..." }`. Combined with the size/time limits and backend prerequisite, an agent has everything needed to call it correctly and predict responses.

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?

Schema description coverage is 100%, so sql, cluster, database, and organization are already documented with baseline clarity. The description reinforces that the SQL must be 'complete' and hints at a backend, but adds no cluster/database/organization resolution semantics beyond the schema. Baseline 3 applies when the schema carries the load.

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?

States a specific verb and resource ('Format complete SQL with the native RawTree formatter') and immediately delimits scope with 'without executing statements or writing database query logs', which separates it from run-query among the siblings. An agent can identify this as a pure formatting utility without opening the schema.

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

Usage Guidelines4/5

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

'without executing statements or writing database query logs' gives clear selection context versus execution tools, and the backend requirement ('Requires a backend with POST /v1/query-format') is a useful precondition. It stops short of naming run-query as the alternative for agents who actually want execution, so it is clear but not fully explicit about when-not.

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