Skip to main content
Glama

Bubble to Cloudflare App & Data Migrator

Load staged records into D1 (paid)

nc_load
DestructiveIdempotent

Loads the staged records into the customer's D1 database by upsert on id. A second run changes zero rows. References to records that do not exist are set to null and logged (orphans), never dropped silently. Each call does a bounded slice and returns status partial until done. truncate_first empties the tables first and needs confirm_overwrite: true. 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_load"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNoUpsert by id (the only mode in v1).
typesNoData type keys to load. Default: all exported types.
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.
reprocessNoRun every staged object again, for example after a schema change. Rows that already match change nothing.
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.
max_requestsNoD1 queries per call. Default 60.
cf_account_idNoThe customer's Cloudflare account id.
truncate_firstNoEmpty the target tables before loading. Needs confirm_overwrite.
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.
confirm_overwriteNoConfirms that existing rows in the target may be overwritten or removed.
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.6/5.0
Behavior5/5

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

Annotations declare destructive and idempotent hints, but the description adds substance beyond them: 'A second run changes zero rows,' orphan references become null and are logged ('never dropped silently'), and truncate_first empties tables. It also discloses billing gates (pass, upgrade, go_ahead) and the chunked 'status partial' execution model.

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?

Dense but front-loaded: the load behavior and idempotence come first, then orphan handling, then the destructive flag, then payment terms. No filler sentences. It is a bit compressed for six distinct concepts, which slightly raises reading effort.

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?

For a 15-parameter mutation tool with no output schema, the description covers what an agent most needs: chunked execution and partial status, irreversibility risk with truncate_first, orphan semantics, and the cost gate that can block the call.

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 already 93%, so most parameters are self-documenting, and the description adds cross-parameter meaning the schema does not: truncate_first's dependency on confirm_overwrite and the pass/trial conditions behind upgrade. Minor gaps remain — nothing in the prose clarifies types, mode, or max_requests defaults beyond the schema.

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 ('Loads the staged records into the customer's D1 database by upsert on id') plus the exact conflict semantics of that upsert. It separates the tool from siblings like nc_preview/nc_verify by naming the write target and staging source.

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 real preconditions: a paid pass or free trial up to 1,000 records, and truncate_first requires confirm_overwrite: true. It does not explicitly route the agent away from a sibling (e.g., when to re-run vs. use nc_preview first), so it stops short of full when/when-not guidance.

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.