Skip to main content
Glama
multidb-mcp

multidb-mcp

execute_sql

Run one SQL statement against a configured database connection and return result rows, with read-only connections limited to SELECT/SHOW/DESCRIBE/EXPLAIN/WITH and row caps applied.

Instructions

Execute a single SQL statement and return the result rows. In read-only connections only SELECT/SHOW/DESCRIBE/EXPLAIN/WITH statements are allowed. Multi-statement SQL is rejected. Results are capped at the configured max rows.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "sql": "<sql>"
    },
    "name": "execute_sql"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL statement to execute. One statement only.
maxRowsNoOverride the configured max rows for this call.
connectionNoConnection name. Omit when only one is configured.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden, and it does disclose real constraints: single statement only, a statement-type allowlist on read-only connections, multi-statement rejection, and a row cap. It does not say what happens on write-enabled connections (whether statements commit or are transactional), how truncation is signaled when the cap is hit, or what permissions are needed. Those omissions matter for a tool that can mutate data.

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?

Three short sentences, zero padding, and the core capability is front-loaded before the constraints. Each sentence carries distinct information: what it does, what is allowed, and what the result limits are.

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?

For a tool with no annotations and no output schema, the definition covers the essential execution rules but leaves gaps around return shape (how rows/columns are presented), truncation signaling, error behavior on rejected statements, and whether writes persist. These are material for an arbitrary-SQL execution tool, so the definition is adequate but not complete.

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 all three parameters are already documented in the schema, making 3 the baseline. The description adds only a small amount beyond that by noting results are capped at the configured max rows, which clarifies the default that maxRows overrides, but it says nothing about connection selection semantics.

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 opens with a precise verb+resource: 'Execute a single SQL statement and return the result rows.' That is unambiguous and clearly distinct from the sibling tools (describe_table, list_tables, list_connections, test_connection), which are schema/introspection oriented. It stops short of naming any sibling explicitly, so it lands just below the top band.

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?

Usage is implied rather than stated: an agent can infer this is the tool for running queries, and the read-only statement allowlist plus the multi-statement rejection give useful guardrails. However, there is no explicit routing guidance such as 'to inspect table structure use describe_table' or 'for connection discovery use list_connections', so the when-to-use-vs-alternative dimension is left to inference.

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