Skip to main content
Glama

discard

Delete a run's branch and worktree to remove isolated code changes. This action is irreversible, so confirm with the developer first.

Instructions

Delete a run's branch and worktree (cannot be undone; ask the developer first).

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

Input Schema

NameRequiredDescriptionDefault
run_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.1.3

TDQS

A3.7/5.0
Behavior4/5

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

With zero annotations, the description carries the full burden and does well on the most important trait: it declares the operation irreversible and names exactly what is destroyed (branch and worktree). It stops short of saying whether uncommitted or unmerged work is lost, or whether the run must be finished first.

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?

One sentence, front-loaded with the destructive action, then the irreversibility clause, then the safety gate. Every clause earns its place and nothing is padded.

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

Completeness3/5

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

For a destructive, no-annotation tool, the irreversible consequence and human-approval requirement are covered, which is the essential part. Missing are preconditions (must the run be idle or cancelled first?) and what happens to unmerged commits, which an agent would want before invoking.

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 0% with one required parameter, so the description must compensate. 'A run's branch' implies run_id identifies the run, but no accepted format or example is given; the param name is largely self-explanatory, so the gap is minor rather than severe.

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: deleting a run's branch and worktree. That is precise enough to separate it from siblings like cancel (stop running) or merge (keep the branch), though it never names those siblings explicitly.

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 'ask the developer first' instruction is a real precondition and signals caution before use, but the description gives no explicit when-to-use vs. cancel/merge/update guidance and no statement of what run state this is valid for.

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