Skip to main content
Glama

agent_close

Terminate a worker agent's tmux session and mark it closed by name or ID. Capture handoffs first; live lead agents are protected from closure.

Instructions

Kill an agent's tmux window and mark it closed, addressed by name (or agent_id). Capture handoffs (todo comments, pads) BEFORE closing; terminal output is not retained. Closing yourself requires confirm_self=true. Refuses a lead target whose pane is live; retires one whose pane is confirmed dead. A worker may never close a lead, live or dead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoThe worker's name, e.g. "impl" or "DEVX-123". Prefer passing this rather than agent_id, but pass only one: if both arrive, agent_id wins and this is ignored. A partial name works when it matches exactly one running worker, so "123" finds DEVX-123.
agent_idNoNumeric agent id. Use name instead unless you have the id to hand.
project_idNoDifferent project override. Use ONLY when the user explicitly asks for another project by name; otherwise stay in the current scope, even when results are empty.
confirm_selfNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
noteNo
closedYes
parkedNo
agent_idYes
park_releasedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so exceptionally. It discloses side effects (terminal output not retained), prerequisites (capture handoffs), a confirmation requirement (confirm_self=true), and refusal/retirement conditions for lead targets. This is rich, honest behavioral disclosure.

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?

The description is three sentences, front-loaded with the core action, and each sentence adds crucial information (side effect warning, self-close requirement, lead restrictions) without redundancy. It is efficient and well-structured.

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

Completeness5/5

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

For a mutation tool with no annotations and an output schema present, the description covers the essential behavioral aspects: the action, side effects, prerequisites, and refusal conditions. It is sufficiently complete for an agent to invoke it correctly, with return values handled by the separate output schema.

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 75%, so baseline is 3. The description adds meaningful semantics beyond the schema: it clarifies that name and agent_id are alternative addressing methods and that confirm_self is specifically for closing yourself. This provides useful usage context for parameters.

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 clearly states the action ('Kill an agent's tmux window and mark it closed') and the target addressing ('by name (or agent_id)'). It is specific enough to distinguish from siblings like agent_park or agent_status, though it does not explicitly name alternatives.

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?

The description gives operational constraints (capture handoffs before closing, confirm_self for self-close, lead restrictions) but does not explicitly state when to use this tool versus alternatives like agent_park or agent_resume. It lacks explicit when-to-use/when-not-to-use guidance.

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