nwd_upload
Upload a Navisworks file (.nwd/.nwf/.nwc) to Autodesk Platform Services (APS) Object Storage and start an SVF2 translation job so the model becomes queryable by the other nwd_* tools.
When to use: at the start of a coordination workflow — e.g. the GC hands off a federated NWD combining MEP + structural + architectural models and the agent needs to stage it for clash review before issuing an RFI, or when a subcontractor publishes a new NWC model revision that must be ingested for weekly BIM coordination. Always the first call in a session for any new model.
When NOT to use: do not call for already-translated models (re-use the returned model_id/URN); do not use for raw Revit .rvt, IFC, or DWG — those go through a different MCP.
APS scopes required: data:read data:write data:create bucket:read bucket:create viewables:read. The worker acquires a 2-legged client-credentials token; the caller does not supply one.
Rate limits: APS default ~50 req/min per app per endpoint; Model Derivative translation job submission ~60 req/min. NWD bundles can be large (hundreds of MB); the upload PUT and translation can take minutes — translation is asynchronous, poll via nwd_export_report (manifest) with exponential backoff (e.g. 5s, 10s, 30s, 60s) before calling clash/properties tools.
Errors the agent should handle: 401 invalid/expired APS token (surface as auth failure — do not retry with same creds); 403 missing scope (report scope gap, do not retry); 404 source file_url unreachable (ask user for a fresh public URL); 409 bucket already exists (handled internally, safe to ignore); 413/422 unsupported Navisworks version — APS Model Derivative supports NWD/NWC from Navisworks 2015 and later (state the unsupported version to the user); 429 rate limited (exponential backoff, retry); 5xx APS upstream (retry once, then surface).
Side effects: creates a fresh transient OSS bucket (scanbim-nwd-, 24h TTL) and uploads the file as an object, then POSTs a Model Derivative translation job. NOT idempotent — each call creates a new bucket/URN even for the same file_url. Logs usage to the D1 usage_log table.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_url | Yes | Publicly reachable HTTPS URL from which the worker will GET the Navisworks file bytes. Must return the raw binary (not an HTML landing page). Pre-signed S3 URLs, ACC/BIM360 signed-resource URLs, and Cloudflare R2 public URLs all work. Max practical size ~4 GB (Cloudflare Workers fetch body limit applies). | |
| file_name | Yes | Logical filename for the OSS object. Must end in .nwd, .nwf, or .nwc (case-insensitive) so APS picks the correct translator. Avoid spaces and non-ASCII — the worker sanitizes to [A-Za-z0-9._-]. Follow ScanBIM convention: <project>_<discipline>_<rev>.nwd (e.g. TowerA_MEPStruct_R07.nwd). | |
| project_id | No | Optional free-form project label stored alongside the upload record for caller-side correlation. Not sent to APS. Typical values: ACC project GUID, internal job number, or short slug. |