Skip to main content
Glama

drop_index

Destructive

Safely remove a MySQL/MariaDB index by capturing its definition first for rollback; preview changes with dry_run before execution.

Instructions

[WRITE][risk=high] Drop an index. Reversible: captures its definition first.

Before dropping, the exact index definition is rebuilt from SHOW CREATE TABLE so the harness records an undo that recreates it. Pass dry_run=True to preview.

Args: table: Table the index belongs to (optionally schema-qualified). name: Index name to drop. dry_run: If True, preview without dropping. target: Target name from config; omit for the default.

Input Schema

NameRequiredDescriptionDefault
nameYes
tableYes
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds genuine value beyond them: the reversibility mechanism is spelled out (the exact definition is rebuilt from SHOW CREATE TABLE to build the undo), and the dry-run preview is surfaced. That is exactly the kind of consequence detail an agent needs before mutating state.

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?

Front-loaded with the risk tag and the reversibility guarantee, followed by an Args block. Every sentence earns its place and there is no repetition of the name or obvious restatement.

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?

No output schema exists, and for a destructive 4-parameter tool the description covers the safety posture, the undo pathway, the preview option, and every argument. Nothing material to calling it correctly 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?

With 0% schema description coverage, the description carries the full parameter burden and does document all four: table ('optionally schema-qualified'), name, dry_run (preview semantics), and target ('from config; omit for the default'). The coverage is complete but terse – no format examples for index or table identifiers.

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 opens with a specific verb+resource ('Drop an index') and immediately qualifies it with a severity tag ([WRITE][risk=high]), so the agent knows the operation class before reading further. It is trivially distinguishable from the create_index sibling and from read-only introspection tools like index_stats.

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?

It gives clear operational guidance: a dry_run=True path for rehearsal and the fact that the harness records an undo before the drop. It does not explicitly name an alternative tool or state when-not-to-drop conditions, so it falls short of full when/when-not/alternatives coverage.

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