Skip to main content
Glama
vrindha-k

Multi-Database AI Query Agent

by vrindha-k

run_query

Execute validated read-only SELECT/CTE queries across independent PostgreSQL databases and return bounded structured results.

Instructions

Execute one validated read-only SELECT/CTE, returning bounded structured results.

Input Schema

NameRequiredDescriptionDefault
sqlYes
max_rowsNo
database_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations, the description carries full behavioral burden and does disclose key traits: read-only, single-statement, validated, and bounded results. It says nothing about timeouts, row-cap enforcement, permission requirements, or what happens on validation failure, which are material for arbitrary SQL execution.

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?

A single front-loaded sentence with no filler; the operative constraints (one statement, read-only, bounded) come before the result clause. Every word earns its place.

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and the core constraint set is present. For an arbitrary-SQL execution tool with zero annotation coverage and undocumented parameters, though, missing error/timeout behavior and database_id sourcing leave it only minimally complete.

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?

Schema description coverage is 0%, so the description must explain all three parameters and does not. 'Bounded' loosely gestures at max_rows and 'one SELECT/CTE' at sql, but database_id (the required identifier) is never mentioned nor its provenance (list_databases) indicated.

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?

States a specific verb (Execute) and resource (one validated read-only SELECT/CTE) with a clear output shape ('bounded structured results'). This implicitly separates it from explain_query and the list_/get_schema siblings, but no sibling is named explicitly.

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?

'one validated read-only SELECT/CTE' implies the boundary (single statement, read-only, validation applies), which is real guidance. However, it never states when to prefer explain_query for plans, or what to do when a query is rejected, leaving usage context to inference.

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