Skip to main content
Glama
bitfiction
by bitfiction

choose_backend_switchover

Destructive

Choose a backend switchover strategy: fully switch to Supabase, keep previews on old backend, park Supabase as backup, or handle manually. Applies the selected method or skips changes.

Instructions

Choose how to handle backend switchover in Phase 7. Call when MANUAL_CHOOSE_BACKEND_SWITCHOVER is READY. IMPORTANT: You MUST present these options to the user and ask them to choose before calling this tool. Four choice values are supported (use the literal string in your choice arg):

  1. 'switch-fully-to-supabase' (method='auto') — Staticbot opens a GitHub PR that replaces ALL Supabase env vars (URL, anon key) in the repo with the migrated target's values. After the PR is merged, BOTH the source platform's previews AND production use the new Supabase. This is the 'I'm leaving Lovable/Base44 for good' choice.

  2. 'source-preview-supabase-prod' (method='skip') — Production deployments read from the migrated Supabase backend; the source platform's preview environment keeps using its own managed Supabase as before. Good for gradual rollout where you keep developing in Lovable/Base44 but ship from the new Supabase. (Only shown to LOVABLE_SUPABASE and BASE44_SUPABASE customers — Bolt previews use WebContainer, not a separately-hosted Supabase.)

  3. 'source-primary-supabase-backup' (method='skip') — Nothing changes for now. The live app stays on the source platform's current setup; the migrated Supabase project is parked as a fallback the user can switch to later. (Same platform gating as #2.)

  4. 'handle-myself' (method='skip') — No automated changes. The user will update environment variables themselves whenever they're ready.

Historical aliases: the old lovable-preview-supabase-prod and lovable-primary-supabase-backup IDs are still accepted by the backend (it stores choice as an opaque label). Prefer the source-* names for new calls so analytics filters reflect the platform-agnostic semantic.

Platform-specific job creation under method='auto': • BASE44_SUPABASE — creates MANUAL_SWITCH_BASE44_SECRETS jobs (Base44 manages env vars on its platform, not in GitHub). The user updates secrets in Base44's UI. • BASE44_NATIVE — Phase 7 is fully automated (installs @bitfiction/base44-supabase-shim into the repo). No manual CHOOSE gate. • All other source types — rewrites env vars in the GitHub repo directly. Do NOT pick an option without asking the user first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
jobIdYesThe MANUAL_CHOOSE_BACKEND_SWITCHOVER job ID
choiceNoSwitchover strategy: 'switch-fully-to-supabase' | 'source-preview-supabase-prod' | 'source-primary-supabase-backup' | 'handle-myself' (or the deprecated `lovable-*` aliases for backward compat)
methodYesSwitchover method
migrationIdYesMigration ID

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?

Annotations already mark destructiveHint=true and readOnlyHint=false, but the description adds concrete side effects: opens a GitHub PR, replaces env vars in the repo, shifts production/preview behavior, and creates platform-specific jobs. Also discloses deprecated aliases and platform gating, providing far more behavioral context than the structured fields alone.

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 purpose and trigger condition, then organizes the four choices into numbered items and platform-specific details into bullets. Though lengthy, every sentence carries essential operational detail for a branching, destructive tool; no filler or redundancy.

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?

Covers trigger, mandatory user-consent step, all choice semantics, method mapping, historical compatibility, and platform-specific job creation. Output schema is present, so omission of return-value detail is acceptable. Nothing needed to call the tool correctly 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?

Schema coverage is 100%, but the description goes beyond the schema by explaining each `choice` literal, its corresponding `method`, the resulting deployment behavior, and deprecation notes. It also clarifies platform-specific behavior under method='auto', enriching parameter meaning substantially.

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 and resource: choose how to handle backend switchover in Phase 7. Differentiates from sibling choose_* tools (choose_data_import_method, choose_frontend_deploy) by naming the backend switchover phase explicitly and enumerating the four choice values.

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?

Explicit trigger condition: 'Call when MANUAL_CHOOSE_BACKEND_SWITCHOVER is READY.' Mandates user interaction: 'You MUST present these options to the user and ask them to choose before calling.' Describes when method='auto' vs 'skip' applies and platform-specific job creation, leaving no ambiguity about when to invoke.

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