Skip to main content
Glama

Sync, configure or delete data source

layerz_manage_integration
Destructive

Runs one operation on a data source (API connector Qonto, Pennylane, Stripe, Airtable, Metabase, or a csv/fec file import) by op. sync: pulls the provider's rows into the bound branch as a replace of this source's own rows (the baseline is untouched); on a file source, replays the projection over the staged rows; target_branch_id lands a still-unbound connection on an existing branch; dry_run: true reports the impact without persisting. rebind: re-points the source at branch_ids, wiping its rows from detached branches and reprojecting into the new ones. update: renames the source (display_name) and/or applies config then replays the projection; a change of import_level or of a tabular mapping (field_map, measures, sign_rule) re-fetches and re-stages, and is rejected on a csv/fec file source. delete: disconnects the source, drops its staged transactions and purges everything it projected into the model (input rows, provenance, import entry); items and the branch are kept, emptied; when the purge would destroy values the source cannot re-project, the call is refused with PURGE_CONFIRMATION_REQUIRED and a purge_preview, and a retry with confirm_purge: true performs it. Every projecting op returns unmapped, proposed_window, deletable_items (reported, not removed), cutover_changes, shadowed, warnings. Credentials stay in the web app. Persists one version labelled with summary. Not advertised to read-only keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
opYesOperation to run on the source.
configNo`update` only: non-secret import config to apply.
dry_runNo`sync` only: reports the impact without persisting.
summaryYesShort note (3–100 chars) describing the change, stored as the label of the resulting version. Examples: "Renamed Revenue to Net Revenue", "Imported 2024 OPEX from Excel".
model_idNoTarget model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys.
branch_idsNo`rebind` only: the existing branches the source feeds afterwards (e.g. ["default"]).
display_nameNo`update` only: new label of the source (metadata, no reprojection).
confirm_purgeNo`delete` only: confirms the purge after a `PURGE_CONFIRMATION_REQUIRED` refusal.
connection_idYesSource id as returned by layerz_list_integrations.
target_branch_idNo`sync` only: existing branch a still-unbound connection feeds (e.g. `default`). Ignored once bound.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / config / properties / field_map / description
      Previous value: -"Tabular sources: source column → canonical field (txn_date, amount, category, description, account_number, period). A value is a column name, a 0-based index, or an array of columns joined with \" / \" as a composite key (category: [\"Sens\", \"Catégorie\"] routes \"Charge / Hébergement\" and \"Produit / Hébergement\" separately). `amount` and `txn_date` are single-column (`measures` covers several value columns). A change re-fetches and re-stages; rejected on a csv/fec file source, whose columns are fixed at import."New value: +"Tabular sources: source column → canonical field (txn_date, amount, category, description, account_number, period). A value is a column name, a 0-based index, or an array of columns joined with \" / \" as a composite key (category: [\"Sens\", \"Catégorie\"] routes \"Charge / Hébergement\" and \"Produit / Hébergement\" separately). `amount` and `txn_date` are single-column (`measures` covers several value columns). A change re-fetches and re-stages. API connectors (Qonto, Pennylane, Stripe): a payload field name per description / category / account_number, taken from `source_fields` in layerz_list_integrations (e.g. Pennylane ledger `{ description: \"entryLabel\", category: \"accountLabel\" }`); a change re-derives the staged rows from their payloads and replays, no provider fetch. Rejected on a csv/fec file source, whose columns are fixed at import."
    • changedInput schema / properties / config / properties / label_field / description
      Previous value: -"Qonto: field the rows are grouped by (counterparty | label | category)."New value: +"Deprecated Qonto alias of `classify_by` + `field_map.description` (counterparty | label | category); still accepted, folded on the next projection."
  2. Changed22 schema fields changed
    • changedInput schema / properties / branch_ids / description
      Previous value: -"`rebind` only: the existing branches this connector should feed (e.g. [\"default\"])."New value: +"`rebind` only: the existing branches the source feeds afterwards (e.g. [\"default\"])."
    • changedInput schema / properties / config / properties / airtable / description
      Previous value: -"Airtable only: base/table (and optional view) to pull records from."New value: +"Airtable: base / table (and optional view) the records come from."
    • changedInput schema / properties / config / properties / classify_by / description
      Previous value: -"Which staged field the rules key on: account_number | description (label) | category. Re-projects from the staged rows."New value: +"Staged field the mapping rules key on: account_number | description (label) | category. Re-projects from the staged rows."
    • changedInput schema / properties / config / properties / field_map / description
      Previous value: -"Tabular sources: source column → canonical field (txn_date, amount, category, description, account_number, period). A value is a column name, a 0-based index, or an ARRAY of columns (composite key, cells joined with \" / \" — e.g. category: [\"Sens\",\"Catégorie\"] routes \"Charge / Hébergement\" and \"Produit / Hébergement\" separately). `amount` and `txn_date` are single-column (a list is rejected — use `measures` for several value columns). Changing it re-fetches + re-stages (tabular sources only — rejected on a csv/fec file source, whose columns are fixed at import: re-import the file instead)."New value: +"Tabular sources: source column → canonical field (txn_date, amount, category, description, account_number, period). A value is a column name, a 0-based index, or an array of columns joined with \" / \" as a composite key (category: [\"Sens\", \"Catégorie\"] routes \"Charge / Hébergement\" and \"Produit / Hébergement\" separately). `amount` and `txn_date` are single-column (`measures` covers several value columns). A change re-fetches and re-stages; rejected on a csv/fec file source, whose columns are fixed at import."
    • changedInput schema / properties / config / properties / import_level / description
      Previous value: -"Pennylane only: which resource to read — trial_balance (per-account monthly balances, default; account source), ledger (individual ledger entry lines keyed by PCG account; account source), or transactions (bank transactions keyed by label; label source). Changing it RE-FETCHES from Pennylane and re-stages (external ids differ per level), unlike the other config fields which only re-project."New value: +"Pennylane: resource read — trial_balance (per-account monthly balances, default), ledger (ledger entry lines keyed by PCG account) or transactions (bank transactions keyed by label). A change re-fetches and re-stages (external ids differ per level)."
    • changedInput schema / properties / config / properties / label_field / description
      Previous value: -"Qonto field to group by: counterparty | label | category."New value: +"Qonto: field the rows are grouped by (counterparty | label | category)."
    • changedInput schema / properties / config / properties / measures / description
      Previous value: -"Tabular sources: N measures per connection for object tables (one row = one object, measures in columns). Each measure stages one row per source row — amount from its column, or 1 when `count: true` — classified under its `key`, so ordinary mapping rules route each measure to its own item (e.g. [{column:\"Jours\"},{column:\"Participants\"},{count:true,key:\"Séjours réalisés\"}] feeds three items from ONE connection, no helper columns in the source). Mutually exclusive with field_map.amount; `classify_by` must be \"category\" or unset; `field_map` still carries txn_date/period. Changing it re-fetches + re-stages (tabular sources only)."New value: +"Tabular sources: several measures per connection for object tables (one row = one object, measures in columns). Each measure stages one row per source row (its column value, or 1 with `count: true`) classified under its `key`, so ordinary mapping rules route each measure to its own item. Mutually exclusive with `field_map.amount`; `classify_by` is \"category\" or unset. A change re-fetches and re-stages (tabular sources only)."
    • changedInput schema / properties / config / properties / measures / items / properties / column / description
      Previous value: -"Value column (header name or 0-based index). Omit for count: true."New value: +"Value column (header name or 0-based index); absent with `count: true`."
    • changedInput schema / properties / config / properties / measures / items / properties / count / description
      Previous value: -"Read the literal 1 per source row (native row counter)."New value: +"Stages the literal 1 per source row (row counter)."
    • changedInput schema / properties / config / properties / measures / items / properties / key / description
      Previous value: -"Classification key the mapping rules route on. Defaults to the column header; required on a count measure."New value: +"Classification key the mapping rules route on; defaults to the column header, required on a count measure."
    • changedInput schema / properties / config / properties / metabase / description
      Previous value: -"Metabase only: the saved question whose results feed the source."New value: +"Metabase: the saved question whose results feed the source."
    • changedInput schema / properties / config / properties / sign_rule / description
      Previous value: -"Tabular sources: negate `amount` when `field` equals one of `negate_values` (e.g. { field: \"Sens\", negate_values: [\"Charge\"] }). Changing it re-fetches + re-stages (tabular sources only)."New value: +"Tabular sources: negates `amount` when `field` equals one of `negate_values` ({ field: \"Sens\", negate_values: [\"Charge\"] }). A change re-fetches and re-stages (tabular sources only)."
    • changedInput schema / properties / config / properties / window / description
      Previous value: -"Confirm the source's authoritative window (months YYYY-MM, inclusive). It BOUNDS the projection: staged rows whose period falls outside [start, end] produce no input in the branch (skipped as `outside confirmed window` — e.g. the in-progress month past the last closed one), inside it every line the source owns (an item a rule targets) with no transaction is forced to 0, and the window `end` becomes the real/forecast cutover (`actuals_through` — the branch keeps the LATEST window end across its sources; any rewrite is reported in `cutover_changes` + `warnings`). Tightening the window then `update`/`sync` also purges previously projected out-of-window inputs (the re-projection replaces this source's whole contribution). A `sync`/`dry_run` returns `proposed_window` to confirm here. Requires full mapping in-window (unmapped keys are surfaced but do not block)."New value: +"The source's authoritative window (months YYYY-MM, inclusive). Staged rows outside [start, end] produce no input (skipped as `outside confirmed window`); inside it, every line the source owns with no transaction reads an explicit 0, and `end` becomes the branch's real/forecast cutover (`actuals_through`, latest window end across its sources; rewrites are reported in `cutover_changes`). Tightening the window purges previously projected out-of-window inputs on the next projection. A `sync` returns `proposed_window` (the staged min/max month)."
    • addedInput schema / properties / confirm_purge
      Added value: +{
      +  "description": "`delete` only: confirms the purge after a `PURGE_CONFIRMATION_REQUIRED` refusal.",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / connection_id / description
      Previous value: -"Connection id from layerz_list_integrations."New value: +"Source id as returned by layerz_list_integrations."
    • changedInput schema / properties / display_name / description
      Previous value: -"`update` only: new display label for the source (Sources panel + layerz_list_integrations). Pure metadata — no reprojection."New value: +"`update` only: new label of the source (metadata, no reprojection)."
    • changedInput schema / properties / dry_run / description
      Previous value: -"`sync` only: preview the impact without persisting."New value: +"`sync` only: reports the impact without persisting."
    • changedInput schema / properties / model_id / description
      Previous value: -"Target model UUID. Required for user-scoped API keys; ignored (or validated against scope) for model-scoped keys."New value: +"Target model UUID. Required for user-scoped API keys; validated against the bound model for model-scoped keys."
    • changedInput schema / properties / op / description
      Previous value: -"Which mutation to run on the connector."New value: +"Operation to run on the source."
    • changedInput schema / properties / op / enum
      Previous value: -[
      -  "sync",
      -  "update",
      -  "rebind"
      -]New value: +[
      +  "sync",
      +  "update",
      +  "rebind",
      +  "delete"
      +]
    • changedInput schema / properties / summary / description
      Previous value: -"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\")."New value: +"Short note (3–100 chars) describing the change, stored as the label of the resulting version. Examples: \"Renamed Revenue to Net Revenue\", \"Imported 2024 OPEX from Excel\"."
    • changedInput schema / properties / target_branch_id / description
      Previous value: -"`sync` only: existing branch id to feed for a still-unbound connection (e.g. `default`). Ignored once the connection is bound."New value: +"`sync` only: existing branch a still-unbound connection feeds (e.g. `default`). Ignored once bound."
  3. Changed3 schema fields changed
    • changedInput schema / properties / config / properties / field_map / description
      Previous value: -"Tabular sources: source column → canonical field (txn_date, amount, category, description, account_number, period). A value is a column name, a 0-based index, or an ARRAY of columns (composite key, cells joined with \" / \" — e.g. category: [\"Sens\",\"Catégorie\"] routes \"Charge / Hébergement\" and \"Produit / Hébergement\" separately). `amount` and `txn_date` are single-column (a list is rejected — use `measures` for several value columns). Changing it re-fetches + re-stages."New value: +"Tabular sources: source column → canonical field (txn_date, amount, category, description, account_number, period). A value is a column name, a 0-based index, or an ARRAY of columns (composite key, cells joined with \" / \" — e.g. category: [\"Sens\",\"Catégorie\"] routes \"Charge / Hébergement\" and \"Produit / Hébergement\" separately). `amount` and `txn_date` are single-column (a list is rejected — use `measures` for several value columns). Changing it re-fetches + re-stages (tabular sources only — rejected on a csv/fec file source, whose columns are fixed at import: re-import the file instead)."
    • changedInput schema / properties / config / properties / measures / description
      Previous value: -"Tabular sources: N measures per connection for object tables (one row = one object, measures in columns). Each measure stages one row per source row — amount from its column, or 1 when `count: true` — classified under its `key`, so ordinary mapping rules route each measure to its own item (e.g. [{column:\"Jours\"},{column:\"Participants\"},{count:true,key:\"Séjours réalisés\"}] feeds three items from ONE connection, no helper columns in the source). Mutually exclusive with field_map.amount; `classify_by` must be \"category\" or unset; `field_map` still carries txn_date/period. Changing it re-fetches + re-stages."New value: +"Tabular sources: N measures per connection for object tables (one row = one object, measures in columns). Each measure stages one row per source row — amount from its column, or 1 when `count: true` — classified under its `key`, so ordinary mapping rules route each measure to its own item (e.g. [{column:\"Jours\"},{column:\"Participants\"},{count:true,key:\"Séjours réalisés\"}] feeds three items from ONE connection, no helper columns in the source). Mutually exclusive with field_map.amount; `classify_by` must be \"category\" or unset; `field_map` still carries txn_date/period. Changing it re-fetches + re-stages (tabular sources only)."
    • changedInput schema / properties / config / properties / sign_rule / description
      Previous value: -"Tabular sources: negate `amount` when `field` equals one of `negate_values` (e.g. { field: \"Sens\", negate_values: [\"Charge\"] }). Changing it re-fetches + re-stages."New value: +"Tabular sources: negate `amount` when `field` equals one of `negate_values` (e.g. { field: \"Sens\", negate_values: [\"Charge\"] }). Changing it re-fetches + re-stages (tabular sources only)."
  4. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources