Skip to main content
Glama

No-code 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.
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. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.