Skip to main content
Glama

preflight_checks

Generate SQL to run on the primary before a MySQL migration to detect long transactions, metadata locks, and replica lag that require waiting.

Instructions

SQL for the user (or DBA) to run on the primary right before deploying a migration: long transactions, long queries and metadata locks on the tables it touches, current table sizes, and how to check replica lag. Each query returns rows only when the deploy should wait. This tool does not connect to the database; hand the SQL to the user.

Args: sql: The migration that is about to run. mysql_version: Optional server version, e.g. "5.7.44"; picks SHOW SLAVE / REPLICA STATUS.

Input Schema

NameRequiredDescriptionDefault
sqlYes
mysql_versionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.3

TDQS

A4.5/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden and does so well: it discloses that it does not touch the database, that checks are for the primary, and that each query returns rows only when the deploy should wait, which tells the agent how to interpret empty results. It stops short of stating the tool is read-only/non-destructive with no side effects and says nothing about the volume or length of the generated SQL.

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 core behavior and the 'does not connect' caveat are front-loaded, followed by a compact Args block. Every sentence carries information the agent needs; nothing repeats the schema or the name.

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

Completeness5/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, this is a high-complexity tool and the description covers what an agent must know: what it produces, that it must be relayed to the user, what the returned rows mean, and how the optional version parameter changes output. Nothing required for correct invocation is missing.

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?

Schema coverage is 0%, so the description must compensate and largely does: it explains that `sql` is the migration about to run and that `mysql_version` is optional server version, with a concrete example ('5.7.44') and its observable effect (picks SHOW SLAVE vs REPLICA STATUS). It could still say what happens when mysql_version is omitted.

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 resource (SQL for pre-deploy checks) with a specific scope: long transactions, long queries, metadata locks on touched tables, table sizes, replica lag. The line 'This tool does not connect to the database; hand the SQL to the user' resolves the biggest ambiguity an agent would have (execute vs. emit) and cleanly separates it from review_migration, which presumably analyzes rather than generates diagnostic SQL.

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?

Timing is explicit ('right before deploying a migration'), which is a real usage condition rather than a vague hint. It lacks an explicit exclusion or a named alternative for adjacent needs (e.g. 'for static analysis of the migration, use review_migration'), so it falls short of a 5.

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