Skip to main content
Glama

Delete a branch

branches.delete
Destructive

Delete a branch and its database. Destructive: needs confirm: true and the destructive scope; a production branch additionally needs production:destructive. Scope: branches:write.

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": {
      "branch": "<branch>"
    },
    "name": "branches.delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
branchYesThe branch to delete
confirmNoMust be true to run a destructive operation, after the user approved it
project_idNoProject id. Optional: defaults to the project created or used last in this session, or the only one.
organization_idNoOrganization id. Optional: defaults to the token's organization, or the only one you belong to.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations only say destructiveHint=true; the description adds concrete value beyond that by disclosing the exact blast radius (the database is deleted too), the required confirmation flag, and the escalating scope requirements including the production-specific scope. This is precisely what an agent needs before committing to an irreversible operation.

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?

Three short, front-loaded sentences with no filler: action and scope first, then the confirmation requirement, then the authorization scopes. Tight and appropriately sized for a destructive tool.

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?

Given four parameters, full schema coverage, no output schema, and annotations already flagging destructiveness, the description covers the things that matter: what gets destroyed, how to confirm, and what scopes are needed. It could note whether the deletion is recoverable (a restore path exists in the sibling set), which is the one meaningful omission.

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 description coverage is 100%, so 'confirm' and 'branch' are already fully documented and the description largely restates the confirm requirement. The one genuine addition is the conditional production scope requirement, which is not expressible in the schema, but overall it adds little parameter meaning beyond the structured data.

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?

States a specific verb and resource ('Delete a branch') and adds the critical blast-radius detail that the branch's database goes with it. It does not explicitly contrast with siblings such as branches.reset or branches.restore, which an agent might otherwise consider for a similar goal, so it stops short of a 5.

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

Usage Guidelines3/5

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

The description gives clear prerequisites for invoking it (confirm: true, destructive scope, production:destructive for production), but gives no guidance on when to prefer this over alternatives like branches.reset, branches.restore, or branches.merge. Usage is implied by the destructive framing rather than stated against alternatives.

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