Skip to main content
Glama

db_query

Execute SQL safely through DBShield guardrails that block destructive DDL and unconstrained mutations lacking WHERE clauses.

Instructions

Safely execute a SQL query through DBShield guardrails. Destructive DDL and unconstrained mutations without WHERE clauses are automatically intercepted and blocked.

Input Schema

NameRequiredDescriptionDefault
sqlYesThe SQL query to execute.
intentNoStated user-facing instruction or business justification for the SQL query. Required in STRICT tier when modifying sensitive fields.
paramsNoOptional parameterized query values.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

B3.4/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 burden, and it does disclose one genuine behavior beyond the schema: destructive DDL and mutations lacking a WHERE clause are intercepted and blocked. It does not say what a block looks like to the caller (error vs. partial result), whether execution is transactional, what permissions or tier gates apply, or anything about rate limits, so the behavioral picture is still incomplete for a query-execution tool.

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?

Two sentences, front-loaded with the purpose and immediately followed by the safety constraint. Nothing is wasted, though the second sentence is a behavioral note rather than a routing aid, slightly misplacing emphasis.

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?

There is no output schema and no annotations, and this is a mutating, guardrailed tool — the highest-burden combination. The description covers safety interception but leaves return shape, failure modes, and the STRICT-tier/intent interaction to the schema and to discovery, which is not quite enough.

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 adds no parameter meaning beyond the schema — it does not explain that 'intent' is gated to a STRICT tier for sensitive-field mutations or how 'params' interacts with the 'sql' placeholder syntax, both of which the schema only touches lightly.

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 pairs a specific verb with a specific resource: execute a SQL query, mediated by 'DBShield guardrails'. That distinguishes it from db_dry_run, db_commit and db_explain_query by implication, but no sibling is named, so an agent must infer the routing rather than read it.

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 only implied: this is the tool that actually runs SQL. The description never says when to prefer db_dry_run, db_commit or db_explain_query first, nor whether a dry run is a prerequisite in this workflow. The one useful contextual statement is that DDL and unconstrained mutations get blocked, which hints at a boundary but is not framed as guidance.

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