Skip to main content
Glama
mark3lim

db-query-mcp

by mark3lim

run_select_query

Execute read-only SQL queries (SELECT, SHOW, DESC, EXPLAIN) against MySQL/MariaDB databases and return up to 50 rows. Prevents data changes by rejecting write queries.

Instructions

읽기 전용 쿼리(SELECT, SHOW, DESC, EXPLAIN)를 실행하고 결과를 반환한다. 데이터를 변경하는 쿼리는 거부된다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes실행할 읽기 전용 SQL 한 문장
connection_noYeslist_connections에서 확인한 DB 연결 번호 (예: '1')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the burden of behavioral disclosure. It clearly states the tool is read-only and rejects data-modifying queries, which is the most important behavioral trait. It does not detail error handling or result formatting, but for a simple execution tool this is adequate.

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 succinct sentence that front-loads the core purpose and the critical restriction (rejecting write queries). Every word earns its place; no fluff or redundancy.

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 only 2 parameters and full schema coverage, the description provides sufficient context: it tells the agent what the tool does, that it's read-only, and that connection_no comes from list_connections. The absence of an output schema means no return format is expected, so the description is complete enough for correct invocation.

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?

The schema already fully documents both parameters with clear descriptions (query as read-only SQL, connection_no from list_connections). The description adds no new semantic detail beyond reinforcing the read-only nature, so the baseline of 3 applies as the schema does the heavy lifting.

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 read-only queries (SELECT, SHOW, DESC, EXPLAIN) and returns results. It explicitly distinguishes itself from the sibling run_write_query by stating that data-modifying queries are rejected, making the purpose unambiguous.

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 indicates when to use this tool (for read-only operations) and sets the boundary against write queries. It also references list_connections for obtaining connection_no, implying a prerequisite step. However, it doesn't explicitly name the alternative tool for write operations, though it's implied by the tool naming and the rejection statement.

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