Skip to main content
Glama

Delete Branch

delete_branch
DestructiveIdempotent

Permanently delete a branch: its files, database copy and comments (merged code stays). Only when the user asked. A branch not merged into main needs discardUnmerged: true.

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

Input Schema

NameRequiredDescriptionDefault
projectIdYes
discardUnmergedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the safety profile is covered; the description then adds genuinely new behavioral detail: exactly which artifacts are destroyed (files, database copy, comments) and the important exception that merged code survives.

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?

Three short sentences, front-loaded with the destructive scope before the usage gate and the parameter rule. No filler or redundant restatement of the title.

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 two-parameter destructive tool with no output schema, the definition covers scope, the user-consent gate, and the unmerged-branch flag. Only the projectId parameter's role and any irreversibility/confirmation expectations are left implicit.

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 0%, so the description must carry parameter meaning, and it does for discardUnmerged by tying it to the precondition 'A branch not merged into main needs discardUnmerged: true'. projectId is left unexplained, which is the only gap.

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?

States a specific verb and resource ('Permanently delete a branch') and immediately scopes the blast radius ('its files, database copy and comments (merged code stays)'), which separates it from sibling deletion tools like delete_file or delete_storage_file that act on individual assets.

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?

The clause 'Only when the user asked' is an explicit, actionable gating condition for when to invoke this destructive operation. No alternative tool is named for branch removal or cleanup, so it stops short of full when-vs-what-else guidance.

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