Skip to main content
Glama
Gowsi31

sql-mcp

by Gowsi31

Run SQL query

query

Execute read-only SQL SELECT statements against a configured database, returning rows as output. Accepts a SELECT or WITH statement to retrieve data.

Instructions

Run a read-only SELECT query against the database and return the results as rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesA SELECT (or WITH ... SELECT) statement.
databaseNoWhich configured database to use (see list_databases). Defaults to the primary database if omitted.
Behavior3/5

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

With no annotations, the description carries the full safety disclosure burden. It does disclose the essential behavior of being read-only, which is critical for an agent considering side effects. However, it does not mention potential limitations (e.g., result size, timeout, error handling) or clarify whether multiple statements are allowed. The description is correct but not richly transparent.

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, well-structured sentence that front-loads the verb ('Run'), specifies the resource ('database'), and states the output ('rows'). Every word adds value with no redundancy or filler.

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 tool with two well-documented parameters and no output schema, the description adequately covers purpose, read-only behavior, and result format. It lacks mention of potential query limits or error behavior, which would be useful given no output schema and no annotations, but the overall context is sufficiently clear. The nearby sibling tools help orient the agent without needing explicit mention.

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 coverage is 100% since both parameters (sql, database) are individually described with sufficient detail. The description adds no new parameter meaning beyond restating that the query is a SELECT, which is already captured in the schema. The constraint 'read-only' is a behavioral qualifier rather than a parameter semantic. Baseline of 3 applies.

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 a specific verb and resource: 'Run a read-only SELECT query against the database.' It specifies the output format ('return the results as rows') and distinguishes itself from sibling tools like list_tables and describe_table by focusing on arbitrary SQL queries.

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 description implies the tool is for executing read-only SELECT statements and indicates it returns results. It does not explicitly name alternatives or provide exclusions, but the 'read-only' qualifier clarifies a key usage constraint and the sibling list shows when other tools might be more appropriate. The schema's reference to list_databases for the database parameter adds some guidance.

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/Gowsi31/sql-mcp'

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