Skip to main content
Glama

execute_query

Execute read-only SQL SELECT queries on a selected database connection, limiting rows returned for controlled data retrieval.

Instructions

Execute a SQL query on a specific database connection (read-only queries)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL query to execute (SELECT statements only)
maxRowsNoMaximum number of rows to return (default: 1000)
connectionIdYesThe ID or name of the database connection to use
Behavior3/5

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

With no annotations, the description carries the burden of behavioral disclosure. It does disclose the read-only safety property, which is essential context. However, it says nothing about potential error behavior, transaction isolation, or results format. For a simple read-only tool, this is adequate but not rich.

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 a single sentence that is concise and front-loaded. It conveys the tool's action (execute), object (SQL query), scope (specific database connection), and safety characteristic (read-only) without any wasted words.

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?

For a simple read-only query tool with no output schema and no annotations, this description covers the core: it names the resource, the action, and the key read-only constraint. It doesn't mention return format, but the presence of maxRows hints at pagination. The sibling list provides sufficient context for distinguishing from write/transaction tools. It could mention 'returns rows' explicitly, but overall it's complete enough.

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 the baseline is 3 even without additional param info. The description adds no new meaning beyond what the schema already provides: it mentions 'SQL query' and 'database connection' which are also in the property descriptions. The 'read-only' qualifier is the only extra semantic, but it's about tool behavior, not parameters.

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 clearly states 'Execute a SQL query on a specific database connection' with the crucial qualifier '(read-only queries)'. This specific verb plus resource (SQL query on a connection) combined with the read-only scope distinguishes it from siblings like write_query and mutation tools.

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?

The read-only qualifier explicitly scopes usage to SELECT queries and implicitly excludes write operations. While it doesn't name an alternative like write_query, the sibling context and schema's 'SELECT statements only' reinforce the boundary. This is clear enough but lacks an explicit 'use write_query for writes' pointer.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sangamkotalwar/omnisql-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server