Skip to main content
Glama

Query database

query_db

Execute parameterized SQL queries against a configured database connection with read-only safeguards, timeout, and row limits. Designed for AI agents needing secure database interaction.

Instructions

Execute a parameterized SQL query against a configured database connection. Read-only by default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connectionNodefault
sqlYes
paramsNo
timeoutMsNo
maxRowsNo
Behavior2/5

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

No annotations are provided, so the description must carry the full burden. It states 'Read-only by default' but does not clarify if write queries are allowed or what the security implications are (e.g., authentication, effects on database state). This leaves significant behavioral ambiguity.

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

Conciseness4/5

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

The description is concise at two sentences with no redundancy, but it is somewhat terse given the complexity of the tool.

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?

Despite having 5 parameters and no output schema, the description fails to cover essential context such as return format, error handling, connection configuration, or timeout behavior, leaving the agent under-informed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and no parameter-level information in the description, the agent receives no added meaning beyond the raw JSON schema. Parameters like connection, params, timeoutMs, and maxRows are unexplained.

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 action ('Execute'), the resource ('parameterized SQL query'), and the context ('against a configured database connection'), distinguishing it from siblings like call_api or run_command.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives such as list_tables or describe_table. The read-only hint is present but does not specify exclusion for write queries or provide context-specific recommendations.

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/marin1321/mcp-devtools'

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