Skip to main content
Glama

db_query

Read-only

Run a single read-only SQL query against the dev database via oxmysql, using ? placeholders and parameters to inspect data safely without modifying it.

Instructions

Run one read-only SQL query (SELECT/SHOW/DESCRIBE/EXPLAIN/WITH) through oxmysql on the dev database. Use ? placeholders with params. Needs bakery_ai_sql 1.

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": {
      "query": "<query>"
    },
    "name": "db_query"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNo
queryYes
paramsNo
serverNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

B3.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds genuinely new behavioral facts: exactly one statement per call, the permitted statement keyword set, the ? placeholder convention, and a hard dependency on the 'bakery_ai_sql 1' resource. It stops short of explaining row capping or error behavior.

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?

Three short sentences, front-loaded with the core action and constraints, and no filler. The final prerequisite sentence is terse to the point of being cryptic ('bakery_ai_sql 1'), but it does carry a real deployment dependency.

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?

With no output schema, the description should say more about what comes back (column shape, row cap interaction with limit, error surfacing), and it leaves two parameters undocumented. It is adequate to call the tool correctly for the common case but incomplete for a four-parameter, arbitrary-SQL interface.

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

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description carries the full burden, and it only explains two of four parameters: query (permitted statement types) and params (? placeholders). The limit parameter (default 50, max 200) and the server parameter are never mentioned, leaving an agent unaware that results are capped or that a server can be selected.

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 (Run) and resource (one read-only SQL query), enumerates the permitted statement types (SELECT/SHOW/DESCRIBE/EXPLAIN/WITH), and names the execution engine (oxmysql) and target (dev database). It does not differentiate against sibling tools, though no sibling appears to be a SQL runner, so the risk of misuse is low.

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?

It establishes the read-only, single-statement constraint and that placeholders must use ?, which implicitly rules out multi-statement or write usage. However, it offers no explicit 'use this when...' framing, no alternatives, and no guidance on what to do when a query needs multiple statements or a non-dev target.

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