Sync or configure data source
layerz_manage_integrationSync or reconfigure a data source (API connector Qonto, Pennylane, Stripe, Airtable, Metabase, or a csv/fec file import) by op. sync: pull the provider's actuals into the bound branch — an idempotent replace of this source's own rows, never the baseline; dry_run: true previews the impact without committing; on a FILE source there is nothing to fetch, so sync replays the projection over its already-staged rows (use it after changing mapping rules); for a still-unbound connection, target_branch_id lands actuals on an existing branch (e.g. default). rebind: re-point the connector at a different set of existing branches (branch_ids) — wipes its rows from detached branches and reprojects into the new ones, never clobbering manual edits. update: rename the source (display_name, pure metadata) and/or change its non-secret import config (see the config field docs) and replay the projection over the staged rows; changing config.import_level or a tabular source's mapping re-fetches + re-stages instead. Every projecting op reports unmapped (keys routing to no line), proposed_window (the span to confirm), deletable_items (empty import-only items a remap orphaned — proposed, never auto-deleted), cutover_changes (a rewritten real/forecast cutover — pin it with layerz_update_branch { actuals_through } if a window should not close periods) and warnings. To disconnect a source, use layerz_delete_integration. Connecting a new key stays in the web app — credentials are never sent over MCP. Not available for read-only API keys.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Which mutation to run on the connector. | |
| config | No | `update` only: non-secret import config to apply. | |
| dry_run | No | `sync` only: preview the impact without persisting. | |
| summary | Yes | Required: short human-readable note (3–100 chars) summarising what this change does. Shown as the label in the model version history. Be specific (e.g. "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel"). | |
| model_id | No | Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys. | |
| branch_ids | No | `rebind` only: the existing branches this connector should feed (e.g. ["default"]). | |
| display_name | No | `update` only: new display label for the source (Sources panel + layerz_list_integrations). Pure metadata — no reprojection. | |
| connection_id | Yes | Connection id from layerz_list_integrations. | |
| target_branch_id | No | `sync` only: existing branch id to feed for a still-unbound connection (e.g. `default`). Ignored once the connection is bound. |