Skip to main content
Glama
bitfiction
by bitfiction

complete_migration_job

Destructive

Complete a pending manual migration job by submitting user-approved input such as reviewed SQL or a sync function URL, unblocking the migration workflow.

Instructions

Complete a manual job that requires user action. Used for jobs with type MANUAL_SYNC_LOVABLE, MANUAL_SYNC_BASE44, MANUAL_EXPORT_DATA, MANUAL_IMPORT_DATA, etc. The job must be in READY status. For MANUAL_SYNC_LOVABLE / MANUAL_SYNC_BASE44 you normally do NOT need this tool: ask the user to open their Lovable project and paste 'deploy staticbot edge function' into the Lovable AI chat (Base44: sync the project from GitHub). Staticbot detects the deployed function and completes the step by itself within about 15 seconds — poll get_migration, or call validate_function_url to check immediately (a reachable function completes the step in that same call). Use this tool for a sync step only when the function URL differs from the one in the job's inputData; calling it on a sync step that already completed returns ok. Format: https://{projectRef}.supabase.co/functions/v1/{functionName}. For MANUAL_REVIEW_SCHEMA (Firebase migrations): show the proposed DDL from the job's inputData, have the user review it, then pass their approved DDL as approvedSql — it is injected into the dependent APPLY_SQL job. Completing without approvedSql leaves APPLY_SQL with no schema to apply.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesMigration job ID (from get_migration_jobs)
approvedSqlNoUser-reviewed DDL (MANUAL_REVIEW_SCHEMA only). Omit for every other manual job type.
functionUrlNoEdge function URL (required for MANUAL_SYNC_LOVABLE; omit for MANUAL_SYNC_BASE44)

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

A4.9/5.0
Behavior5/5

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

Beyond the annotations, the description discloses important side effects and edge-case behavior: calling it on an already-completed sync step returns ok, completing a MANUAL_REVIEW_SCHEMA job without approvedSql leaves the dependent APPLY_SQL job with nothing to apply, and Staticbot auto-completes sync steps within about 15 seconds. This goes well beyond the readOnlyHint/destructiveHint annotations and helps the agent reason about outcomes.

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?

The description is dense and front-loaded with the core purpose, and every sentence carries useful information. It is somewhat long and runs together as one paragraph, but the complexity of the tool justifies the length. Minor restructuring into explicit scenarios would improve scannability, but there is no fluff.

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 complexity, the description covers prerequisites (READY status), per-job-type behavior, automatic completion alternatives, exact function URL format, and the consequence of omitting approvedSql. With an output schema present and 100% parameter coverage, an agent has everything needed to decide whether and how to call the tool correctly.

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?

Although the schema already covers all parameters, the description adds substantial meaning: it explains the functionUrl format (https://{projectRef}.supabase.co/functions/v1/{functionName}), clarifies that functionUrl is required for MANUAL_SYNC_LOVABLE but omitted for MANUAL_SYNC_BASE44, and elaborates on approvedSql being injected into the dependent APPLY_SQL job. These details go beyond the schema 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: 'Complete a manual job that requires user action.' It then names the exact job types it applies to (MANUAL_SYNC_LOVABLE, MANUAL_SYNC_BASE44, MANUAL_EXPORT_DATA, MANUAL_IMPORT_DATA, etc.), making its scope unambiguous. This clearly distinguishes it from sibling tools like retry_migration_job or skip_migration_job.

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 gives exceptionally clear when-to-use guidance: for sync jobs it explicitly says the tool is normally NOT needed, tells the agent to ask the user to paste a command, and specifies to poll get_migration or call validate_function_url instead. It also states the precise condition for using this tool ('only when the function URL differs from the one in the job's inputData') and gives step-by-step handling for MANUAL_REVIEW_SCHEMA.

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