Skip to main content
Glama

cfg_branch_delete

Remove a draft branch and its associated commits from the target config database, with a dry-run option to preview affected commits and records before deleting.

Instructions

Delete a draft branch and its branch commits.

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": {
      "name": "<name>"
    },
    "name": "cfg_branch_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNoEnvironment name from .cfg.toml (e.g. dev, prod). Selects the target database.dev
nameYesName of the branch to delete.
authorNoAuthor attribution hint. Ignored/rejected in authenticated/enforced identity modes where a verified identity is required.
dry_runNoShow what would be deleted (draft commits, records touched); delete nothing.
config_fileNoOmit: the server uses the .cfg.toml it started with. A different path is refused unless the server runs with CFGIT_MCP_ALLOW_CONFIG_OVERRIDE=1.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.5

TDQS

B3.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the key blast radius: the branch's commits are deleted along with it, not just the branch pointer. However, it omits irreversibility, whether the deletion is recoverable via cfg_restore, permission/identity requirements, and that a dry_run mode exists in the schema.

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

Conciseness4/5

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

A single front-loaded sentence with no filler and the destructive verb in the first position. It is economical to a fault — the same word budget could have carried one safety clause without becoming verbose.

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?

An output schema exists, so return values need not be explained, and the schema fully documents all five parameters. The remaining gap is behavioral rather than structural: a destructive, irreversible, cascading operation with no annotations should say so and point at dry_run.

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

Parameters3/5

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

Schema coverage is 100%, so env, name, author, dry_run, and config_file are each described in the schema, making baseline 3 appropriate. The description adds no meaning beyond the schema — notably it never mentions dry_run, which is the most decision-relevant parameter for a destructive call.

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?

Names a specific verb and resource ('Delete a draft branch') and adds the cascade scope ('and its branch commits'), which distinguishes it from read-only siblings like cfg_branch_list or cfg_branch_diff. The 'draft' qualifier signals this is not arbitrary branch removal, but no sibling is named as an alternative.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus cfg_rm, cfg_branch_create, or cfg_restore, and no stated preconditions (must the branch be unmerged? does it need to be a draft?). Nothing tells the agent to consider dry_run or to prefer another tool for a non-destructive inspection first.

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