remove_data_source
Detach a data source, or delete one of its snapshot generations (bt-p1opf.8: merges the former detach_data_source and delete_data_source_snapshot tools; action selects the behavior). Requires at least Editor role. action=‘detach’: disconnect the source from future model runs (soft-delete; retained for lineage). Referenced snapshots stay retained and listable via list_data_sources(include_snapshots=true); unreferenced ones become eligible for cleanup.
destructive
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | Annotated[str, Field(description='Name of the Bridge Town model.')] | Yes | — | |
data_source_id | Annotated[str, Field(description='Data source ID, as returned by list_data_sources.')] | Yes | — | |
action | Annotated[str, Field(description="'detach' to disconnect the source from future runs (soft-delete; dry-run/confirmation-token gated), or 'delete_snapshot' to delete one specific, unreferenced, non-current snapshot generation (requires snapshot_id).")] | Yes | — | |
snapshot_id | Annotated[str, Field(description="Opaque snapshot ID, as returned by list_data_sources(include_snapshots=true). Required when action='delete_snapshot'; ignored otherwise.")] | No | '' | |
dry_run | Annotated[bool, Field(description="Preview the detach without mutating anything. Only applies to action='detach'.")] | No | True | |
confirmation_token | `Annotated[str | None, Field(description=“Token required to confirm the detach (returned by a dry run). Only applies to action=‘detach’.”)]` | No | None |
workspace_id | `Annotated[str | None, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
model_name(string)data_source_id(string)action(string)source_name(string)source_type(string)detached(boolean)already_detached(boolean)dry_run(boolean)confirmation_token(string)message(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": "remove_data_source", "arguments": { "model_name": "forecasts", "data_source_id": "6e00ea4c-239d-4ac8-a3eb-ceedca558c78", "action": "detach" }}Response
Section titled “Response”{ "model_name": "forecasts", "data_source_id": "6e00ea4c-239d-4ac8-a3eb-ceedca558c78", "action": "detach", "source_name": "budget_inputs", "source_type": "file_upload", "detached": false, "already_detached": false, "dry_run": true, "confirmation_token": "eyJleHAiOjE3ODAwMDAwMDB9.6f2c...", "message": "Dry run: data source 'budget_inputs' would be detached from 'forecasts'. Pass dry_run=False with confirmation_token to execute.", "workspace_id": "6e00ea4c-239d-4ac8-a3eb-ceedca558c78"}- Module:
Data - Requires authentication via API token or Auth0 JWT.