Skip to main content
Glama

No-code app data migrator

Copy files to R2 and link them (paid)

nc_files
Idempotent

Copies every file and image the loaded data points at from the source's storage into the customer's R2 bucket, stored under its content hash (the same file is stored once). Records old URL to new key in the file_map table, fills each file field's key column, and keeps the old URL in its legacy column. Links inside text are copied too; rewriting the text is off unless rewrite_text is true, and the originals are backed up. Only the source platform's own storage is copied unless allow_hosts adds more. Resumable: each call does a bounded batch and returns status partial until done. 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_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
bucketNoR2 bucket for the files. Default: the staging bucket.
job_idYes
rewriteNoFill the key columns once a file is copied. Default true.
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.
max_bytesNoLargest file to copy. Default 50 MB.
max_filesNoFiles per call. Default 15.
r2_bucketNoAn R2 bucket in that account, for staging and schema files.
url_prefixNoPrefix for rewritten text links. Default /files/.
allow_hostsNoExtra hosts to copy from, for example images.example.com. Links to other hosts are listed, not copied.
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.
retry_failedNoTry again the files that failed or were skipped earlier.
rewrite_textNoAlso replace links inside text values with url_prefix plus the new key. Originals go to text_url_backup. Default false.
cf_account_idNoThe customer's Cloudflare account id.
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. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.