Skip to main content
Glama

SaturnSQL

Run SQL

execute_query
Destructive

Run SQL against a connection and return rows. Connections in read-only mode accept a single SELECT, WITH or EXPLAIN statement.

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL to run, in the connection's own dialect.
limitNoMaximum rows to return, 1 to 10000. Defaults to 1000.
connectionIdYesConnection id from list_connections.

Output Schema

NameRequiredDescriptionDefault
resultNo
successNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedOutput schema / properties / result / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "properties": {
      -      "duration": {
      -        "description": "Execution time in milliseconds.",
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "fields": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "additionalProperties": true,
      -              "properties": {
      -                "name": {
      -                  "type": [
      -                    "string",
      -                    "null"
      -                  ]
      -                }
      -              },
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ]
      -      },
      -      "rowCount": {
      -        "type": [
      -          "number",
      -          "null"
      -        ]
      -      },
      -      "rows": {
      -        "anyOf": [
      -          {
      -            "items": {
      -              "additionalProperties": {},
      -              "type": "object"
      -            },
      -            "type": "array"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "description": "One object per row, keyed by column name."
      -      },
      -      "truncated": {
      -        "description": "True when the row limit or memory cap cut the result short.",
      -        "type": [
      -          "boolean",
      -          "null"
      -        ]
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": {},
      +    "properties": {
      +      "duration": {
      +        "description": "Execution time in milliseconds.",
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "fields": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "additionalProperties": {},
      +              "properties": {
      +                "name": {
      +                  "type": [
      +                    "string",
      +                    "null"
      +                  ]
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ]
      +      },
      +      "rowCount": {
      +        "type": [
      +          "number",
      +          "null"
      +        ]
      +      },
      +      "rows": {
      +        "anyOf": [
      +          {
      +            "items": {
      +              "additionalProperties": {},
      +              "propertyNames": {
      +                "type": "string"
      +              },
      +              "type": "object"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "One object per row, keyed by column name."
      +      },
      +      "truncated": {
      +        "description": "True when the row limit or memory cap cut the result short.",
      +        "type": [
      +          "boolean",
      +          "null"
      +        ]
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=false, so the safety profile is partly covered. The description adds the non-obvious single-statement restriction in read-only mode and that rows are returned, but it never warns that a non-read-only connection accepts writes or DDL, nor mentions timeouts, termination, or result truncation via limit.

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 sentences, zero filler, and the core action is front-loaded before the conditional constraint. Nothing is repeated from the schema or title.

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

Completeness3/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-shape explanation is not required, and the parameter schema is fully documented. However, for a destructive-flagged arbitrary-SQL executor, the description leaves out what happens on write connections, whether multiple statements are rejected, and any execution limits — meaningful gaps for this tool's risk profile.

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%, with all three parameters documented including the limit bounds/default and the connectionId source. The description adds no parameter-level meaning beyond that, so the baseline 3 applies.

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?

States a specific verb and resource ("Run SQL against a connection and return rows") plus the statement types accepted in read-only mode. It is clearly distinguishable from run_saved_query or run_schedule_now by implication, but never names a sibling to make that routing explicit.

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

Usage Guidelines3/5

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

The read-only-mode constraint (single SELECT, WITH or EXPLAIN) is a useful contextual guideline about when this form is accepted, but it is framed as a backend rule rather than usage guidance. Nothing tells the agent when to prefer run_saved_query, run_schedule_now, or export_query_results instead.

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