Skip to main content
Glama

close_agent

Closes a Parley-opened terminal tab for an agent session; external tabs stay protected unless explicitly allowed.

Instructions

Close a terminal tab opened by Parley. Refuses to close pre-existing external tabs unless allowExternal is explicitly 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": {
      "target": "<target>"
    },
    "name": "close_agent"
  }
}

Input Schema

NameRequiredDescriptionDefault
targetYesTarget agent tabId or label.
allowExternalNoMust be true to close a tab that was not opened by Parley.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/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 disclose one important trait: the tool safely refuses to close tabs it did not create, and the override must be explicit. It does not say what closing does to a running agent (termination, lost in-flight work, irreversibility) or how refusal is surfaced, so the destructive side remains under-described. This is a real but partial disclosure for a mutation tool with no annotation coverage.

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?

Two sentences, zero filler, with the primary action first and the safety caveat second in the order an agent needs them. Nothing is repeated or padded.

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 tool with a fully documented schema and no output schema, the description covers purpose, the guardrail, and the override well enough to call correctly. The remaining gap is outcome detail — what state the closed agent is left in and how refusal is reported — which a cautious agent would want before invoking a destructive operation.

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 both parameters are already documented in the schema, including allowExternal's default and meaning. The description reinforces allowExternal as an explicit opt-in but adds no new detail about the target format (tabId vs label) beyond the schema, so the baseline 3 applies.

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 uses a specific verb and resource ("Close a terminal tab") and narrows it to tabs "opened by Parley," which is enough to separate it from siblings like open_agent or list_agents that manage the same tab space. It stops short of naming a contrasting sibling, but the action and scope are unambiguous.

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 description gives a clear condition for the risky case: pre-existing external tabs are refused unless allowExternal is explicitly true, which tells an agent when the call will fail and how to override it. It does not state when an agent should prefer closing over leaving a tab open, or mention any sibling for alternative cleanup paths.

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