Skip to main content
Glama
Auto Ontology MCP

Auto Ontology MCP

by gogoymh

Validate Sql

validate_sql
Read-only

Checks SQL before execution for read-only safety, unknown tables/columns, invalid ontology joins, suspicious literals, aggregate fan-out, dry-run errors, and certified term reliance.

Instructions

Check a query before running it: read-only guard, unknown tables/columns, joins that are not (or not the default) relationships in the ontology, wrong-looking literals (near-miss values, percent vs fraction), one-to-many fan-out under SUM/AVG/COUNT, and a dry run. Also reports which Terms the query relies on and whether they are certified.

Input Schema

NameRequiredDescriptionDefault
sqlYesOne read-only SELECT in the datasource dialect.
datasourceNoDatasource name. Optional when only one datasource is registered.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.1/5.0
Behavior4/5

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

The annotations already declare a safe, non-destructive read with open-world access, so the safety profile is covered. The description adds meaningful behavior beyond that: it performs a dry run and reports Term certification status, which tells the agent the tool may execute against the datasource and returns governance metadata. It does not disclose cost, latency, or whether failures block execution.

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?

Purpose is front-loaded in the first clause, followed by a compact enumeration of checks. It is a single dense sentence but every clause names a distinct capability, so there is little waste, though it would scan better as a list.

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?

An output schema exists, so return values need not be explained, and the description covers the full set of validations an agent would want to know about. The only gap is operational context: whether validation is cheap, whether a dry run touches the datasource, and whether a failing check prevents execution.

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% for both parameters, including the read-only SELECT constraint and the optional datasource default, so the schema carries the parameter burden. The description adds no parameter-level detail and does not mention the datasource parameter at all; baseline 3 applies.

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?

States a specific verb and resource ('Check a query') and then enumerates the exact checks performed: read-only guard, unknown tables/columns, non-ontology joins, near-miss literals, fan-out under aggregates, dry run, and Term certification. That level of specificity clearly distinguishes it from run_sql and check_answerable.

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?

'Check a query before running it' establishes the workflow position relative to run_sql without naming the sibling. There is no explicit exclusion (e.g., when validation is unnecessary or when it should be skipped for trivial queries), so it falls short of a full when/when-not statement.

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