Skip to main content
Glama

cross_db_query

Read-onlyIdempotent

⚠️ SQL MUST BE VALID IN EVERY DIALECT YOU TARGET — stick to ANSI-ish SELECT syntax when mixing pg/mysql/mssql. SELECT TOP 10 (mssql) or LIMIT (others) will fail on the wrong side. Run the same query across 2-4 connections in parallel; returns per-connection rows + errors for diffing. Canonical use cases: regional compare (['mssql-reporting-us', 'mssql-reporting-eu']), cross-dialect sync check (['prod-postgres-fleet', 'prod-mysql-app']), 3-env drift, 4-region compare. Resolve every connection name via list_connections first; tool fails per-connection on unknown names. ARCHITECT-tier cap: 4 connections; https://www.thinair.co/ for unlimited. [ARCHITECT tier]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesSQL query to run on each connection. Must be valid in every dialect targeted — prefer ANSI SELECT syntax when mixing dialects.
connectionsYesArray of 2-4 connection NAMES (not IDs) from list_connections output. Examples: ['mssql-reporting-us', 'mssql-reporting-eu'] for regional compare, ['prod-postgres-fleet', 'prod-mysql-app'] for cross-dialect sync check.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
metaNo
displayNo
summaryNo
insightsNo

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, but the description adds significant behavioral context: parallel execution, per-connection rows + errors, dialect-specific failure modes, the 4-connection cap, and the requirement to resolve names beforehand. This goes well beyond what annotations convey and gives the agent a realistic behavioral model.

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 dense and front-loaded with the critical dialect warning, then the core behavior, use cases, and constraints. Every sentence serves a purpose, though the emoji and repeated canonical examples could be trimmed. It remains well-structured and efficient for its complexity.

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

Completeness5/5

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

For a tool that executes SQL across multiple heterogeneous connections, the description covers the key operational aspects: dialect compatibility, connection naming/resolution, parallel execution, per-connection error reporting, and usage limits. The presence of an output schema means return values need no further explanation. This is highly complete for the tool's complexity.

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?

Schema description coverage is 100%, so the baseline is 3. The description largely restates the schema's parameter explanations (2-4 connections, dialect-valid SQL, use list_connections). It adds the ARCHITECT-tier cap and a URL, but these are not new parameter semantics beyond what the schema already states. Thus no meaningful extra value is contributed.

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 states precisely: 'Run the same query across 2-4 connections in parallel; returns per-connection rows + errors for diffing.' This clearly identifies the verb (run), resource (connections), and output, and distinguishes it from single-connection tools like query_sql by emphasizing parallel cross-connection execution.

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

Usage Guidelines5/5

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

It explicitly lists canonical use cases (regional compare, cross-dialect sync check, 3-env drift, 4-region compare), warns about dialect incompatibilities (MSSQL TOP vs LIMIT), and instructs to resolve connection names via list_connections first. It thus provides clear when-to-use and prerequisite guidance, even if it doesn't name a specific alternative tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.9/5.0
Disambiguation4/5

Each tool targets a distinct resource/action, though some overlap exists between analyze_table and data_profile (both profile tables) and between pii_scan and configure_allowlist (both deal with PII). Clear descriptions and separation of quick vs. full analysis mitigate confusion.

Naming Consistency3/5

Most tools follow verb_noun (add_connection, describe_schema, generate_migration), but a notable minority use noun phrases (data_profile, pii_scan, query_firewall, saved_queries, quota, impact_analysis). This mixed convention creates inconsistency, though the naming is still readable.

Tool Count3/5

26 tools is slightly over the 16-25 heavy threshold, but each tool addresses a distinct need across connection management, querying, analysis, security, and performance. While the count feels high, the breadth justifies it; however, it's approaching the 'too many' range.

Completeness5/5

The tool set covers the full lifecycle: connections (add/remove/list/test), querying (query_sql, saved_queries, cross_db_query), schema exploration/migration (describe_schema, generate_migration, impact_analysis), data quality/compliance (analyze_table, data_profile, pii_scan), performance (explain_query, optimize_query, show_locks), and monitoring (watch_table, detect_anomalies). Any gaps are minor, such as no update_connection, but that's not a core need.

Resources