Skip to main content
Glama

preflight_schema_only

Analyze SQL against pasted CREATE TABLE DDL without a database connection. Detects risky patterns like SELECT *, missing LIMIT, unindexed filters, and functions on filtered columns.

Instructions

Analyse a query against pasted CREATE TABLE DDL with NO database connection — the zero-trust, offline front door. Call when the user gave you their schema (DDL) but not DB credentials. Catches SELECT *, missing LIMIT, un-indexed filter columns, LIKE '%...', functions on filtered columns. HEURISTIC only (no live counts) and says so. No target needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ddlYes
sqlYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and does well: it discloses that results are HEURISTIC only, that there are no live counts, and that it 'says so' in output. It also enumerates the specific classes of issues caught (SELECT *, missing LIMIT, un-indexed filters, LIKE '%...', functions on filtered columns).

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?

Front-loads the differentiating capability (offline, zero-trust) and stays compact. The parenthetical 'the zero-trust, offline front door' is slightly marketing-flavored but earns space by signaling the routing distinction.

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-value detail is not required. The description covers what the tool examines and its heuristic limitation, which is enough for correct invocation; only parameter-shape guidance is thin.

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 coverage is 0% for 2 required params, so the description must compensate. It implies ddl = pasted CREATE TABLE DDL and sql = the query, but adds no format, sizing, or multi-statement guidance for either. Some meaning, but incomplete.

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 (analyse) plus resource (query vs CREATE TABLE DDL) and the defining constraint (NO database connection). It clearly distinguishes itself from preflight_query by scoping to the offline case where no target/credentials exist.

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?

Gives an explicit trigger: 'Call when the user gave you their schema (DDL) but not DB credentials.' The 'No target needed' line reinforces when this applies versus a connection-requiring sibling, though it never names preflight_query as the alternative.

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