Skip to main content
Glama

Veto — SQL Safety & Cost Oracle

Analyze SQL safety & cost

analyze_sql

Analyze Postgres SQL/migrations for destructive operations, locking risk, correctness traps (NULL handling that silently returns wrong results), anti-patterns, and query cost. Returns a deterministic verdict (ok/warn/block) with findings. Pass the optional schema argument (your CREATE TABLE/INDEX DDL) to also get EXPLAIN-based cost analysis run on a throwaway scratch Postgres — no separate tool or DB connection needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sqlYesThe SQL to analyze (one or more statements).
schemaNoOptional CREATE TABLE/INDEX DDL. Providing it enables EXPLAIN-based cost analysis (seq scans on large tables, etc.) on a throwaway scratch Postgres; omit it for static safety analysis only.
dialectNo
rowCountHintsNoOptional map of table name to estimated row count for realistic cost estimates.

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description discloses deterministic verdict (ok/warn/block) and that cost analysis uses a throwaway Postgres instance. It does not mention side effects or permissions, but as a read-only analysis tool, this is adequate.

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?

The description is two sentences, front-loaded with purpose, then key detail on optional schema. No wasted words, every sentence adds value.

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?

Given no output schema, the description covers input, behavior, and output type (verdict with findings). It does not detail findings structure, but is sufficient for agent use.

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?

The description adds meaningful context beyond the schema: explains schema parameter enables cost analysis, sql accepts multiple statements, and rowCountHints is for realistic estimates. Schema coverage is 75%, and the description compensates well.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly defines the tool as analyzing Postgres SQL/migrations for specific issues (destructive operations, locking, correctness traps, etc.). It distinguishes from siblings (get_policies, set_policies) which serve different purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explains when to use static vs. cost analysis based on the schema parameter. It does not explicitly state when not to use or provide alternatives to other SQL analysis tools, but siblings are unrelated.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: analyze SQL, get policies, and set policies. No overlap or ambiguity.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case: analyze_sql, get_policies, set_policies.

Tool Count5/5

Three tools is appropriate for the domain of SQL safety and policy management, covering the essential operations without excess.

Completeness5/5

The tool surface provides full lifecycle for policies (get, set, clear via empty array) and comprehensive SQL analysis including cost estimation, with no obvious gaps.