Skip to main content
Glama

Bubble to Cloudflare 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, rich text and JSON are copied too, and replaced by the app's file route (a list of files holds bare keys); the originals are backed up in text_url_backup (rewrite_text: false turns the replacing off). Every link ends copied or listed as failed with its reason, and the step is not done while any link to the old storage has no outcome. 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.
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.
url_prefixNoPrefix for rewritten text links. Default /api/files/ (the generated app's file route).
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_textNoReplace links inside text values with url_prefix plus the new key (a list of files gets the bare key). Originals go to text_url_backup. Default true.
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. Changed2 schema fields changed
    • changedInput schema / properties / rewrite_text / description
      Previous value: -"Also replace links inside text values with url_prefix plus the new key. Originals go to text_url_backup. Default false."New value: +"Replace links inside text values with url_prefix plus the new key (a list of files gets the bare key). Originals go to text_url_backup. Default true."
    • changedInput schema / properties / url_prefix / description
      Previous value: -"Prefix for rewritten text links. Default /files/."New value: +"Prefix for rewritten text links. Default /api/files/ (the generated app's file route)."
  2. 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"
      +}
  3. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Beyond the annotations, the description discloses that files are stored under content hash (so the same file is written once), that rewriting is backed up in text_url_backup and reversible via rewrite_text=false, and that every link must reach a copied or failed outcome before the step completes. It also explains the paid/trial gating and the resumable bounded-batch behavior, which is exactly the kind of context annotations cannot carry.

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?

The core action and its scoping constraint are front-loaded, and every sentence carries real information (dedupe, backups, failure outcomes, paid gate, resumability). It is dense and unbroken as a single paragraph, which makes the paid/resumable facts easy to miss, but there is little wasted wording.

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 17-parameter, paid, resumable mutation tool with no output schema, the description covers the important gaps: storage scoping, dedupe, backup/rollback, failure accounting, batch resumption, and the pass/trial requirement. It leaves credential acquisition and per-call return shape to the schema and nc_connect, which is reasonable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 94%, so the schema already documents bucket, max_files, max_bytes, allow_hosts, and the credential parameters. The description adds only marginal cross-parameter meaning ('rewrite_text: false turns the replacing off', 'a list of files holds bare keys') that largely echoes the schema text, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a precise verb and resource: copy every file/image the loaded data points at from source storage into the customer's R2 bucket, with scope limits ('only the source platform's own storage is copied unless allow_hosts adds more'). It is unmistakably the file-copy step, but it never names a sibling (e.g. nc_move, nc_export) to distinguish itself explicitly.

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?

Clear operational context is given: needs a paid pass or free trial, must be resumed with bounded batches returning 'partial' until done, and retry_failed exists for earlier failures. What is missing is explicit routing guidance — when to pick this over other copy/move siblings.

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.