Skip to main content
Glama

Bubble to Cloudflare App & Data Migrator

Generate and create the D1 schema (paid)

nc_schema
Idempotent

Generates numbered D1 migration SQL files and a Drizzle schema from the agreed plan (nc_plan), and writes them to the customer's R2 under nc//schema/. With apply: true it creates the D1 database in the customer's account and runs the migrations. Safe to repeat: every statement is idempotent. Run nc_plan first and agree its skip list with the owner. Paid: needs a pass for the app, or the free trial for plans up to 1,000 records.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "job_id": "<job_id>"
    },
    "name": "nc_schema"
  }
}

Input Schema

NameRequiredDescriptionDefault
applyNoCreate the database and run the migrations. Default false: only generate the files.
job_idYes
upgradeNoSet true to pay the difference to the next pass that fits, only when the app is past its pass's (or free trial's) record or file limit.
go_aheadNoSet true only when a charge applies, once the owner has seen the estimate and agreed to it. Not needed under the free trial or a pass that already covers the app. Needed again after a pass has expired.
r2_bucketNoAn R2 bucket in that account, for staging and schema files.
job_secretNoThe job_secret returned when this job was made (or the job's signed editor link). Required with job_id when no API key is sent: the job_id alone does not open a job.
cf_api_tokenNoA Cloudflare API token with D1 edit permission on that account. Sealed in the job, deleted when it ends. Prefer nc_connect with job_id: the owner types tokens on a secure page. Only pass it here if nc_connect is not available.
cf_account_idNoThe customer's Cloudflare account id.
database_nameNoName of the D1 database to create or reuse, for example nc-sharehousehub-staging.
max_statementsNoStatements to run per call when applying. Default 100.
r2_access_key_idNoAccess key id of an R2 API token that can read and write that bucket. Prefer nc_connect with job_id: the owner types tokens on a secure page. Only pass it here if nc_connect is not available.
r2_secret_access_keyNoIts secret. Sealed in the job, deleted when it ends. Prefer nc_connect with job_id: the owner types tokens on a secure page. Only pass it here if nc_connect is not available.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / job_secret
      Added value: +{
      +  "description": "The job_secret returned when this job was made (or the job's signed editor link). Required with job_id when no API key is sent: the job_id alone does not open a job.",
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare idempotency, non-read-only, and open-world scope, so the description's addition of where files land (nc/<job>/schema/) and that apply: true creates a database in the customer's account is genuine extra context. The paid gating and the "agree skip list with the owner" precondition are behavioral facts not in the annotations. It repeats idempotency from idempotentHint and says nothing about recovery from a failed migration run.

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?

Five short sentences, front-loaded with what is generated and where, then the apply side effect, then idempotency, then the prerequisite, then the billing gate. No filler and no restatement of the title.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 12-parameter, credential-bearing, billable mutation tool with no output schema, the description covers artifacts, destination, side effects, repeatability, prerequisite ordering, and cost gating. It omits operational detail such as what happens when a migration run stops partway (the max_statements-per-call semantics live only in the schema), which for an apply-capable tool would be worth one clause.

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 92%, so the baseline is 3 and the schema already documents apply, upgrade, go_ahead, and credentials in detail. The description nevertheless adds meaning the schema cannot: the payment model that makes upgrade and go_ahead necessary (pass vs. free trial, record limits) and the ordering relationship between generate and apply.

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 concrete artifacts: numbered D1 migration SQL files plus a Drizzle schema, generated from the nc_plan output and written to a named R2 path. It also distinguishes the two modes (files only vs. apply: true creating the database) so an agent can tell exactly what this tool produces versus its nc_plan sibling.

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?

Gives sequencing ("Run nc_plan first and agree its skip list with the owner") and a clear precondition for the paid path (a pass, or the free trial for plans up to 1,000 records). It does not name an alternative for the generate-only case beyond the apply flag, but the when-to-use context is otherwise explicit.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.