Skip to main content
Glama

query_db

Execute read-only SELECT queries on a configured database to inspect data within a row limit.

Instructions

Executes a caller-supplied SELECT statement against a configured database, bounded by row limit. Only SELECT is permitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dbYesDatabase name as defined in infra-mcp.yaml
sqlYesSELECT statement to execute; non-SELECT statements are rejected
limitNoMaximum rows to return; server-capped at 100

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that only SELECT is allowed and that results are bounded by a row limit, but does not mention logging, error handling, or if the operation is read-only (though implied). The description adds limited value beyond the schema, which already states the SELECT restriction.

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?

Single sentence that clearly states the tool's action and key constraint. No unnecessary words; front-loaded with the verb and resource.

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 simple query tool with 3 parameters and an output schema (known from context), the description is mostly adequate. It states the operation and constraint. However, it could briefly mention that the result format is handled by the output schema. Still, it covers essential behavioral information.

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?

Input schema has 100% coverage, providing descriptions for all three parameters. The description does not add substantial meaning beyond what the schema already offers; it only reiterates the row limit bound. Baseline score 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?

Description explicitly states the action 'Executes a caller-supplied SELECT statement' against a configured database, clearly identifying the resource and operation. It distinguishes from sibling tools like describe_table and list_tables by focusing on executing arbitrary SELECT queries.

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?

Description implies usage for running SELECT queries but does not specify when to use this tool versus alternatives like describe_table or list_tables. No explicit when-not-to-use guidance is provided, only the constraint that only SELECT is permitted.

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/esp4ce/infra-mcp'

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