Skip to main content
Glama
Yukuiii

any-db-mcp

by Yukuiii

query

Run read-only SQL SELECT, SHOW, or DESCRIBE statements against connected databases; returns up to 1,000 rows or fails on timeout. Use explain for execution plans.

Instructions

执行只读 SQL 查询(SELECT / SHOW / DESCRIBE)。响应最多返回前 1000 行,并通过 limit 字段告知本次返回上限;超过 QUERY_TIMEOUT_MS 会失败。执行计划请使用 explain 工具。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes要执行的 SQL 查询语句

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.2.2

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose real behavioral traits: read-only safety, a hard 1000-row cap communicated via a limit field, and failure past QUERY_TIMEOUT_MS. It omits auth/connection prerequisites and what happens to rows beyond the cap, but the operational profile is well covered.

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?

Three tight clauses with zero filler: capability and scope first, then limits, then the alternative tool. Every sentence earns its place and the most important constraint (read-only) is front-loaded.

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 single-parameter read tool with no output schema, the description covers the essentials an agent needs: allowed statement types, truncation behavior, timeout, and the explain alternative, including the limit field that stands in for an output schema. Missing only error/connection context.

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?

Only one parameter and schema description coverage is 100%, so the schema already documents the sql parameter. The description adds no syntax or format guidance for the query string, so the baseline of 3 is appropriate.

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?

States a specific verb and resource (执行只读 SQL 查询) and enumerates the accepted statement types (SELECT / SHOW / DESCRIBE), which separates it from write-oriented siblings like transaction and execute. An agent can identify the tool's job without opening the schema.

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?

Explicitly routes execution-planning needs to the explain tool (执行计划请使用 explain 工具), a clear condition-to-alternative mapping. It does not, however, distinguish this tool from the sibling execute or transaction, leaving some ambiguity for an agent choosing between SQL execution paths.

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