Skip to main content
Glama
mcp-bd-service

mcp-bd-service

by jtesotelo

run_query

Read-onlyIdempotent

Executes a single read-only SQL SELECT or WITH query against the connected database, returning row- and time-limited results for safe data exploration.

Instructions

Run ONE read-only SQL query (SELECT or WITH ... SELECT) in the database's SQL dialect. Results are limited in rows and execution time.

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": "run_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
sqlYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so safety is covered. The description adds real value beyond them by disclosing that results are truncated by row count and execution time — an agent knows to expect partial results on large queries. It stops short of naming the actual limits, which would have made this a 5.

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?

Two tight sentences, front-loaded with the verb and resource, then the limits. Nothing is redundant or padded.

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

Completeness4/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 read-only plus truncation behavior is stated. Missing specifics are the numeric row/time caps and the concrete dialect, though neither blocks correct invocation.

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

Parameters4/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 carry the parameter. It does meaningfully: the single `sql` argument must be one statement, must be SELECT/WITH-based, and must be written in the database's SQL dialect. Only the dialect itself is left unidentified.

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 and resource ('Run ONE read-only SQL query') and constrains the accepted statement forms to SELECT or WITH ... SELECT. That is unambiguous, but it never contrasts itself with siblings like sample_rows or list_tables, which an agent might reasonably consider for data retrieval.

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 restriction to read-only single-statement SQL implies when the tool applies, and 'ONE' warns against multi-statement use. There is no explicit when-to-use/when-not guidance and no pointer to alternatives such as sample_rows for a cheap preview.

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