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.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "summary": "<summary>",
      "op": "<op>",
      "connection_id": "<connection_id>"
    },
    "name": "layerz_manage_integration"
  }
}

Input 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. Changed5 schema fields changed
    • addedInput schema / properties / config / properties / window / anyOf
      Added value: +[
      +  {
      +    "properties": {
      +      "end": {
      +        "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
      +        "type": "string"
      +      },
      +      "start": {
      +        "pattern": "^\\d{4}-(0[1-9]|1[0-2])$",
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / config / properties / window / description
      Previous 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)."New value: +"The source's authoritative window (months YYYY-MM, inclusive), auto-applied from the staged span at the first projection. 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`). `{ end }` alone keeps the stored `start`; `null` resets to the staged span. The replay drops the inputs the source previously wrote outside the new window, listed as `purged_periods`."
    • removedInput schema / properties / config / properties / window / properties
      Removed value: -{
      -  "end": {
      -    "type": "string"
      -  },
      -  "start": {
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / config / properties / window / required
      Removed value: -[
      -  "start",
      -  "end"
      -]
    • removedInput schema / properties / config / properties / window / type
      Removed value: -"object"
  2. Changed1 schema field changed
    • addedInput schema / properties / config / properties / fallback
      Added value: +{
      +  "description": "What a key no mapping rule covers becomes. `auto_create: true` creates a line named after the key; false (the default once the model has rules) leaves the row `unmapped`. A change re-projects from the staged rows.",
      +  "properties": {
      +    "auto_create": {
      +      "type": "boolean"
      +    }
      +  },
      +  "type": "object"
      +}
  3. 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."
  4. 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."
  5. 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)."
  6. First observed

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Well beyond the annotations, the description discloses exactly what delete destroys (staged transactions, input rows, provenance, import entry) and what survives (items and branch kept but emptied), the confirmation/refusal protocol with `purge_preview`, and the returned diagnostic fields (unmapped, proposed_window, deletable_items, cutover_changes, shadowed, warnings). It also notes credentials never leave the web app and that each call persists a version labelled with `summary`. This is consistent with destructiveHint=true and idempotentHint=false.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The content is front-loaded with the op enumeration, but it is delivered as one enormous semicolon-chained paragraph mixing purpose, per-op behavior, error protocol, and return fields. Several passages restate schema descriptions (field_map, measures, sign_rule) instead of adding value, which inflates length without new information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter mutation tool with nested objects and no output schema, the description covers the mutation semantics, irreversible effects, the confirmation flow, and even the shape of returned diagnostics. Remaining gaps are minor — e.g. rate limits or fetch duration for large syncs are unaddressed — but an agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds meaningful op-to-parameter routing that the schema only hints at: `dry_run`, `target_branch_id`, `branch_ids`, `display_name`, `config`, and `confirm_purge` are each tied to a specific op, and `import_level` values are explained per provider. Much of the config sub-object detail (field_map, measures, sign_rule) is duplicated rather than extended, which keeps it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a concrete verb and resource ('Runs one operation on a data source') and enumerates the four operations with their effects (sync pulls rows, rebind re-points, update renames/reconfigures, delete disconnects and purges). It is clearly distinguishable from siblings like layerz_list_integrations, which is cited as the source of connection_id. It loses a point only because the purpose statement is buried in a very dense paragraph rather than stated crisply up front.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Each op is annotated with its conditions of use: `dry_run` for impact-only sync, `target_branch_id` only for still-unbound connections, `confirm_purge` only after a PURGE_CONFIRMATION_REQUIRED refusal, and `field_map`/`import_level` changes rejected on csv/fec. It also states it is not advertised to read-only keys. It never names a genuine alternative tool for overlapping tasks (e.g. layerz_manage_mapping vs config.field_map), so the when-not guidance is partial.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources