Skip to main content
Glama

database_db_query

Run SQL SELECT queries to retrieve data from databases and return results as structured tables. Ideal for data analysis and reporting tasks.

Instructions

[database] Run a SQL SELECT query and return results as a table of rows.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYes
paramsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It only states the tool runs a SELECT query and returns results, but fails to mention potential side effects (none expected), performance implications, error handling, or security considerations. The output format is vaguely described as 'table of rows' without detail.

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

Conciseness3/5

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

The description is a single sentence, making it concise. However, it omits important details about parameters and usage, making it under-specified. The '[database]' prefix adds context but does not compensate for missing structure or clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (executing SQL queries) and the presence of an output schema, the description is incomplete. It does not specify that only SELECT queries are allowed, how results are returned, any limitations on query complexity, or how to use the optional 'params' parameter. The tool's capabilities are underdescribed.

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?

The input schema has 0% description coverage, so the description must compensate for missing parameter semantics. While the description mentions running a SQL SELECT query, it does not explain the 'params' parameter, which is crucial for parameterized queries. The 'sql' parameter is implied but not elaborated.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it runs a SQL SELECT query and returns results as a table of rows. It identifies the specific type of SQL operation (SELECT) and the output format, which helps distinguish it from sibling tools like database_db_execute. However, it does not explicitly differentiate from other database tools beyond that.

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?

The description implies that the tool is for read-only querying by specifying 'SELECT query', but it does not provide explicit guidance on when to use it versus alternatives like database_db_execute. It lacks context about invocation conditions or exclusion criteria.

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/0-co/agent-friend'

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