Skip to main content
Glama
bitfiction
by bitfiction

clean_migration_target

Destructive

Clean conflicting database objects, storage buckets, or both from a Supabase migration target to prepare for execution. Requires explicit user confirmation via confirmationProjectRef; irreversible.

Instructions

Destructively clean conflicting objects from a Supabase Cloud migration target before execution starts. Call get_clean_target_plan first and take confirmProjectRef from its response — it reports the live state and whether cleanup is even available. DATABASE deletes user-created database objects, Supabase migration history, and existing authentication users/sessions while preserving Storage. STORAGE empties and deletes every Storage bucket and file while preserving database/auth data. PROJECT performs both cleanups. This cannot be undone. Before calling, get the migration, present the exact scope consequences and targetConflictReport.confirmationProjectRef, and obtain explicit user confirmation for that exact project and scope. Copy the returned confirmationProjectRef into confirmProjectRef; never guess it. The migration remains paused after cleanup.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesMigration ID
scopeYesExact destructive scope explicitly approved by the user
confirmProjectRefYesExact targetConflictReport.confirmationProjectRef repeated after explicit user confirmation

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesParsed JSON response from the Staticbot public API

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.8.1

TDQS

A5/5.0
Behavior5/5

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

Although the destructiveHint annotation already signals mutation, the description goes much further: it enumerates exactly what DATABASE, STORAGE, and PROJECT scopes delete and preserve, and states that the operation cannot be undone. This substantially exceeds the annotation's binary signal and gives the agent the full safety picture.

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 appropriately detailed for a destructive irreversible operation and every sentence serves a purpose: defining scopes, stating the prerequisite plan call, mandating confirmation, and noting post-state. It is structured by scope type for easy parsing, with the most critical warning front-loaded.

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?

Given the tool's destructive nature, the description fully covers prerequisites, per-scope effects, irreversibility, required user confirmation, and the post-cleanup state. The presence of an output schema means return-value details do not need to be repeated. Nothing needed to call this tool safely is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all three parameters, so the baseline is high. The description still adds meaning by explaining where confirmProjectRef comes from, requiring that it be copied rather than guessed, and tying the scope parameter to the exact scope the user approved. This is genuinely useful beyond the schema's field-level descriptions.

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 and resource: 'Destructively clean conflicting objects from a Supabase Cloud migration target.' It clearly distinguishes this tool from get_clean_target_plan by framing it as the destructive execution step that follows the planning call.

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

Usage Guidelines5/5

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

The description explicitly instructs the agent to call get_clean_target_plan first, retrieve confirmProjectRef from its response, and obtain explicit user confirmation before proceeding. It also specifies exact scope consequences and even notes that the migration remains paused after cleanup, giving the agent a clear execution protocol.

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