Skip to main content
Glama

query_connection

Run a read-only SQL SELECT query against a specified source connection to inspect or preview data without modifying it.

Instructions

Execute a read-only SQL query against a source connection.

Args: connection_id: The connection to query. query: A single SELECT statement (no mutations allowed).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
connection_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior4/5

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

There are no annotations, so the description itself must carry the safety disclosure; it does so by stating 'read-only' and 'no mutations allowed.' It also communicates that queries must be a single SELECT statement, which is a meaningful behavioral constraint. It does not cover error behavior or limits, but the output schema covers return structure.

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?

The description is compact and front-loaded, with a clear one-line purpose followed by brief parameter explanations. No filler or redundant restatement of the tool name.

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?

For a simple two-parameter tool with an output schema, the description covers the action, parameter semantics, and the key read-only/no-mutation behavioral constraint. Nothing essential appears to be missing for an agent to invoke it correctly.

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

Parameters4/5

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

Schema description coverage is 0%, so the description must compensate, and it does: query is explained as 'A single SELECT statement (no mutations allowed),' which adds a real constraint beyond the schema. connection_id is described as 'The connection to query,' which is somewhat tautological but still orients the agent to the intended resource.

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 opens with a specific verb and resource: 'Execute a read-only SQL query against a source connection.' The 'read-only' and SELECT framing clearly separates it from mutation-oriented tools. It does not explicitly name sibling alternatives like preview_connection, so it stops short of full sibling differentiation.

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?

It clearly establishes this tool is for read-only queries and restricts input to 'a single SELECT statement (no mutations allowed),' giving an explicit functional boundary. It does not explicitly tell the agent when to prefer related tools such as preview_connection or introspect_connection, but the context is not misleading.

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