Skip to main content
Glama
surinch-db-guard

surinch-db-guard

sql_readonly_review

Review MySQL and PostgreSQL SQL for read-only safety and anti-patterns, then issue a SHA-256 verifiable receipt. Avoids false flags for REPLACE() and comments.

Instructions

Static readonly safety gate & anti-pattern reviewer for MySQL/PostgreSQL SQL with SHA-256 verifiable receipt. Does not falsely flag REPLACE() or comments.

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

Input Schema

NameRequiredDescriptionDefault
sqlYesSQL statement(s) to review.
dialectNopostgresql

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses static analysis, readonly gating, anti-pattern review, a SHA-256 receipt, and false-positive avoidance for REPLACE() and comments, but omits what the gate returns, whether it blocks or reports, and what the receipt contains.

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 sentences, front-loaded, with no filler. The key scope and the false-positive caveat are both stated efficiently.

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

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no annotations and no output schema, the description should explain return values and gate semantics. It only mentions a 'SHA-256 verifiable receipt' without explaining output structure or decision behavior, which is a significant gap for a safety-gate tool.

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 50%, with the sql parameter documented and the dialect enum/default visible in schema. The description reinforces MySQL/PostgreSQL targeting but adds little beyond the schema about dialect behavior or SQL statement format.

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 ('review') and resource ('MySQL/PostgreSQL SQL') and scopes it to readonly safety and anti-patterns. It does not explicitly differentiate itself from siblings like ddl_governance_check, so it falls short of a 5.

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?

Implies use when reviewing SQL for readonly safety and anti-patterns, but gives no explicit when-to-use/when-not guidance or alternatives. The false-positive note for REPLACE() and comments is useful context but not routing guidance.

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