Skip to main content
Glama
Rheopyrin

db-access-mcp

query

Execute SQL queries on a configured database connection, with control over row limits, timeouts, and database selection.

Instructions

Execute a SQL query on a configured connection (use connection_list to discover keys). Results are truncated to max_rows (default from config, typically 1000) with truncated=true set; add LIMIT for large tables. Connections marked read_only reject writes at the session level. Multi-statement scripts are passed to the driver as-is (for mysql they require multipleStatements enabled in the connection options).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSQL text to execute
databaseNoDatabase to run against; required when the connection declares multiple databases
max_rowsNoRow cap for this call (overrides config)
connectionYesConnection key from connection_list
timeout_msNoQuery timeout in ms for this call (overrides config)
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses truncation with a truncated flag, read-only enforcement, and driver-specific multi-statement behavior. It does not detail error handling or logging, but covers essential behavioral traits for a query tool.

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 concise with three sentences. The first sentence states the purpose and a helpful hint. Subsequent sentences efficiently detail truncation, read-only behavior, and multi-statement handling. No extraneous information.

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?

The description covers key behaviors but lacks details on the return format (e.g., structure of results, handling of errors, or what happens with empty results). Given the absence of an output schema, more information about the response would improve completeness for a query tool.

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 coverage is 100%, so baseline is 3. The description adds value by explaining the connection parameter (use connection_list to discover keys), max_rows default from config, and multi-statement driver requirement for query. This goes beyond the schema descriptions, justifying a score of 4.

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 the tool executes a SQL query on a configured connection, with a hint to discover connection keys. It distinguishes from sibling tools like query_plan and query_to_file by describing query execution behavior.

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 provides guidance on when to use (e.g., for SQL execution) and mentions prerequisites (use connection_list). It advises adding LIMIT for large tables and explains behavior for read-only connections and multi-statement scripts. However, it does not explicitly list alternatives or conditions to avoid using this tool.

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/Rheopyrin/db-access-mcp'

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