create_upload_link
Create a one-time link the person opens in the Bridge Town web app to upload a file too large or unreadable to pass inline: a CSV or Excel file of numbers (purpose=‘data_source’) or an Excel model to convert (purpose=‘excel_conversion’). Adds an empty upload slot bound to this person and model; nothing existing changes. The link expires in one hour. Returns: upload_url, expires_at, staged_upload_id, message (for the person), hint.
changes state
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
model_name |
string |
Yes | — | Name of the model the file is for. |
purpose |
one of: data_source, excel_conversion |
Yes | — | ‘data_source’ for a CSV or Excel file of numbers to add as a data source; ‘excel_conversion’ for an Excel model whose formulas should be converted. |
workspace_id |
string |
No | None |
Optional UUID of a workspace other than your current one to target. Omit to use your current workspace (unchanged default behavior). Cross-workspace targeting requires an active membership in that workspace and, since this tool names a model, a grant on that model there; it is only available to OAuth/JWT sessions — API tokens stay scoped to their issuing workspace. The response echoes workspace_id so you can reuse it on follow-up calls. |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
model_name(string)purpose(string)upload_url(string)expires_at(string)expires_in(string)staged_upload_id(string)accepted_file_types(array<string>)max_size_bytes(integer)message(string)hint(string)workspace_id(string)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "create_upload_link", "arguments": { "model_name": "forecasts", "purpose": "excel_conversion" }}Response
Section titled “Response”{ "model_name": "forecasts", "purpose": "excel_conversion", "upload_url": "https://app.bridgetown.builders/models/handoff?ws=dddddddd-dddd-dddd-dddd-dddddddddddd&model=forecasts&token=...", "expires_at": "2026-04-28T11:00:00+00:00", "expires_in": "1 hour", "staged_upload_id": "12121212-1212-1212-1212-121212121212", "accepted_file_types": [ ".xlsm", ".xlsx" ], "max_size_bytes": 52428800, "message": "Open this link, sign in if asked, and upload the workbook for forecasts. The link works once and expires in 1 hour. When the page says the file is received, come back here and say it's uploaded.", "hint": "After the person says it is uploaded, call get_transfer(job_id='12121212-1212-1212-1212-121212121212', kind='upload') to confirm the file arrived, then start the conversion with POST /api/models/{model_name}/excel-conversions and this staged_upload_id.", "workspace_id": "dddddddd-dddd-dddd-dddd-dddddddddddd"}- Module:
Data - Requires an authenticated Bridge Town session (OAuth) or an API token.