Skip to main content
Glama

finish_task

Finalize an isolated task by merging approved work into the base branch, keeping the branch, or discarding the worktree and branch; confirm before merge.

Instructions

merge: squash into the base branch (approved only; user's tree must be clean). keep: leave the branch. discard: delete worktree and branch. Ask the user before merge.

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": {
      "task_id": "<task_id>",
      "action": "<action>"
    },
    "name": "finish_task"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYes
task_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does well: it discloses irreversibility ('delete worktree and branch'), state requirements ('tree must be clean'), and a human-approval gate before merging. It omits what happens on failure (e.g., a dirty tree or unapproved branch) and whether the task record itself is updated or closed.

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?

Four short clauses, one per action, with the safety-critical caveats inlined next to 'merge' where they matter. The telegraphic parenthetical style ('approved only; user's tree must be clean') is dense but not wasteful; no filler sentences.

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 terminal, mutating lifecycle tool the description covers effects, preconditions, and the confirmation requirement, and an output schema exists so return values need no explanation. However, 'approved only' is undefined (presumably tied to submit_review), and the post-action state of the task itself is unaddressed — gaps that matter for a one-way operation.

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 supply parameter meaning — and it does, defining each enum value's consequence in prose that the bare enum list cannot convey. The task_id parameter is left entirely to its name, with no hint about where the identifier comes from.

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?

The description spells out precisely what each of the three actions does — squash-merge into base, leave the branch, delete worktree and branch — which is far more concrete than the name 'finish_task'. It never states the overarching purpose in a single clause (relies on the name for that) and does not explicitly contrast with siblings like submit_review, 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 Guidelines4/5

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

It gives clear preconditions for the risky path ('approved only; user's tree must be clean') and a mandatory confirmation step ('Ask the user before merge'), which tells the agent when to pause. It doesn't say when to prefer 'keep' over 'discard' or when this tool should follow submit_review, so some selection logic is left to inference.

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