Skip to main content
Glama

SaturnSQL

Export query results

export_query_results
Destructive

Run SQL and export the rows as csv, json, or xlsx. xlsx is returned base64-encoded.

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL whose result to export.
limitNoMaximum rows. Omit on PostgreSQL and MySQL to export everything the query returns.
formatYesFile format of the export.
connectionIdYesConnection id from list_connections.

Output Schema

NameRequiredDescriptionDefault
formatYes
contentYesThe file body: CSV or JSON text, or base64 for xlsx.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / limit / maximum
      Added value: +9007199254740991
  2. First observed

TDQS

B3.4/5.0
Behavior3/5

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

The annotations already declare destructiveHint=true and readOnlyHint=false, signaling that arbitrary SQL is executed with mutation potential. The description adds one genuinely non-schema behavior — that xlsx output is base64-encoded — but says nothing about how csv/json are delivered (inline vs. written to disk), whether writes are committed, or any size/timeout constraints on large exports.

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

Conciseness5/5

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

Two short sentences, zero filler, and the key operational detail (base64 xlsx) is placed front and center. Nothing to trim.

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?

An output schema exists, so return-value explanation is not required, and the parameter list is fully covered by the schema. The remaining gap is the relationship to execute_query/run_saved_query, which the description never resolves for an agent choosing among four query-running siblings.

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 all four parameters are already documented, including the useful note about omitting limit on PostgreSQL/MySQL. The description only restates the format enum and adds the base64 detail, so it neither needs to nor does add much parameter meaning.

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

Purpose4/5

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

The description states a specific verb and resource ('Run SQL and export the rows') and enumerates the supported output formats, so the purpose is unambiguous. However, it never distinguishes itself from the obvious sibling execute_query, leaving the agent to infer why a separate export tool exists.

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

Usage Guidelines2/5

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

There is no statement of when to choose this over execute_query or run_saved_query, and no exclusions or prerequisites (e.g. 'use when you need a downloadable file rather than in-memory rows'). The only usage hint is implicit in the word 'export'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources