Skip to main content
Glama

dq_run_sql

Read-onlyIdempotent

Confirm a data quality hypothesis by running one read-only SELECT query; any non-SELECT SQL statement is rejected.

Instructions

Run one read-only SELECT to confirm a hypothesis. Any other statement type is rejected.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesA single SELECT (DuckDB dialect). Table names as listed by dq_list_sources.
limitNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is covered. The description adds genuinely new behavioral context beyond them: the server enforces a single SELECT and rejects anything else, which tells the agent to expect hard failures on DDL/DML or multi-statement batches. It still omits what a rejection looks like and how the row cap interacts with large result sets.

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 short sentences, zero waste, with the core action front-loaded and the enforcement constraint immediately after. Nothing is buried or repeated.

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?

The tool is simple, an output schema exists, and annotations carry the safety profile, so the description does not need to explain return values. What an agent might still want — the default/max row limit behavior and where to find valid table names — is only partially covered (the latter lives in the schema, the former nowhere).

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?

At 50% schema description coverage, the sql parameter is already well documented in the schema (DuckDB dialect, table names from dq_list_sources), and the description adds no further syntax guidance. The limit parameter carries only a default and min/max in the schema, and the description says nothing about capping result size — a real gap for a query tool.

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 states a specific verb and resource ('Run one read-only SELECT') plus the enforcement scope ('any other statement type is rejected'). It does not name any sibling tool or contrast itself with the profiling/checking tools, so an agent must infer that this is the ad-hoc query escape hatch rather than a canned check.

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?

'To confirm a hypothesis' implies the intended moment of use — exploratory verification rather than bulk extraction or scheduled checks — and the rejection sentence warns off non-SELECT attempts. However, it never states when to prefer a sibling (e.g. dq_check_nulls, dq_profile_table) over an ad-hoc query, leaving that routing decision to inference.

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