Skip to main content
Glama

Delete branch

layerz_delete_branch
Destructive

Deletes a branch, every input row tagged with its dataset_id, and the data sources that fed only that branch (their staged transactions with them); a source shared with another branch is detached instead. The default branch is rejected. Returns deleted_dataset_id, inputs_removed, sources_removed. Persists one version labelled with summary. Not advertised to read-only keys.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
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.
dataset_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • 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 / 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\"."
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

While annotations already flag destructiveHint=true, the description adds substantial context beyond them: exact cascade semantics, the detachment of shared sources, default-branch rejection, the version persisted with the summary label, the returned counters, and read-only key exclusion.

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

Conciseness5/5

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

Dense and front-loaded: each clause carries a distinct fact (scope, shared-source rule, precondition, return fields, version, auth). No filler sentences; nothing could be removed without losing information.

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

Completeness5/5

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

With no output schema, the description enumerates the return fields, and it covers preconditions and side effects for a destructive multi-entity mutation. Nothing an agent needs to invoke this safely appears to be missing.

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 67% and the description compensates: it clarifies that dataset_id identifies the branch being deleted and that summary labels the persisted version. The undocumented model_id is only weakly covered ('Not advertised to read-only keys' implies key scoping but doesn't explain the model_id requirement).

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

Purpose5/5

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

The description opens with a specific verb+resource ('Deletes a branch') and immediately details the cascade scope (input rows tagged with the dataset_id, exclusive data sources, detachment for shared sources). This distinguishes it sharply from layerz_update_branch and the other branch/model siblings.

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?

It gives clear conditions: the default branch is rejected and read-only keys don't see it, and it explains the shared-source detachment rule. It stops short of explicitly naming an alternative (e.g., update_branch) for the case where a delete isn't wanted, so it's strong context but not full when/when-not routing.

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