Skip to main content
Glama
ottimis

mcp-query

by ottimis

query

Execute SQL queries on a database connection with access control, row limits, and multi-statement blocking.

Instructions

Execute a SQL query on a database connection.

The query type is checked against the connection's allowed operations. Permissions can be a preset (read, write, admin) or a custom list of allowed operations (e.g. [select, insert]).

Multi-statement queries are blocked. SELECT queries have an automatic row limit.

Args: connection: Name of the database connection to use. sql: The SQL query to execute.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionYes
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

No annotations provided, so description carries full burden. Discloses important behaviors: query type checked against allowed operations, multi-statement queries blocked, and automatic row limit for SELECT. No contradictions.

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

Conciseness4/5

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

Well-structured with a clear one-line summary followed by bullet-like details. Not overly verbose, though some redundancy exists. Efficient for its content.

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?

Covers key behavioral aspects (permissions, multi-statement block, row limit). Has output schema, so return values not needed. Lacks error handling details, but overall adequate for a query tool.

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

Parameters2/5

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

Schema coverage is 0%, so description must add meaning. Mentions connection is 'name of the database connection' and sql is 'the SQL query', but lacks details on formats, constraints, or allowed values. Behavioral aspects are more about the tool than parameter specifics.

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?

Description clearly states it executes a SQL query on a database connection, with a specific verb and resource. It distinguishes from sibling tools like describe_table, list_connections, list_tables, and query_log which cover different aspects of database interaction.

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?

Provides context on query type checking, multi-statement blocking, and row limits, but does not explicitly guide when to use this tool versus alternatives like describe_table or query_log. No when-not or sibling comparisons.

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/ottimis/mcp-query'

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