Skip to main content
Glama

terminal_close

Close a terminal session and kill its underlying process by session ID, including safe cleanup when the session is already closed.

Instructions

Close a terminal session and kill the underlying process. Idempotent — safe to call on already-closed sessions.

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": {
      "session_id": "<session_id>"
    },
    "name": "terminal_close"
  }
}

Input Schema

NameRequiredDescriptionDefault
session_idYesThe session ID returned by terminal_spawn

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does disclose the two key traits: the process is killed (destructive, irreversible) and the operation is idempotent on already-closed sessions. It stops short of saying whether buffered output or session artifacts survive, which would round this out.

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 short sentences, front-loaded with the action and effect, with the idempotency caveat second. No filler.

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 single-parameter teardown tool with no output schema, the description covers the essential semantics. The only gap is what the caller should expect regarding any session results or errors, which is minor here.

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 coverage is 100% and the single parameter is documented there as coming from terminal_spawn. The description adds no syntax, format, or error-shape detail beyond that, so baseline 3 applies.

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?

The description names a specific verb and resource ("Close a terminal session") plus the concrete effect ("kill the underlying process"), which unambiguously separates it from siblings like terminal_spawn, terminal_send_key, and terminal_type.

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 idempotency note implies you need not pre-check session state before calling, which is useful context. However, there is no explicit statement of when to call this versus leaving a session alive, nor any prerequisite or cleanup-ordering guidance.

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