Skip to main content
Glama
alexforster

terminal-emulator-mcp

by alexforster

terminal_close

DestructiveIdempotent

Close a terminal session, terminate its process group, and release its screen. For unknown or already-closed IDs, returns closed:false to indicate no action taken.

Instructions

Close a terminal, cancel pending work, terminate its process group, and release its screen. Returns {sessionId,closed}; an unknown or already-closed ID returns closed:false.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate destructive=true and idempotent=true, and the description adds valuable behavioral detail beyond those hints: it explicitly states that pending work is canceled, the process group is terminated, the screen is released, and that unknown or already-closed IDs return closed:false. This tells the agent exactly what will be destroyed and how idempotency manifests, which is strong 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 two sentences with zero filler. The first sentence front-loads the primary action and its immediate consequences, and the second sentence precisely documents the return value and the failure/idempotent case. Every clause earns its place.

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 one-parameter tool with rich annotations already covering destructiveness and idempotency, the description is complete. It specifies the return shape ({sessionId, closed}), the behavior for invalid IDs, and the side effects on the terminal's process and screen. No output schema exists, so documenting the return contract here is essential and is handled well.

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?

The schema only provides sessionId as a string with minLength 1? sub>1, and schema description coverage is 0%. The description compensates by discussing the behavior of 'an unknown or already-closed ID', which clarifies the semantic meaning of sessionId as the terminal identifier and describes an edge case. It does not elaborate on format requirements, but for a single self-descriptive parameter this is adequate.

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 opens with a specific verb and resource combination: 'Close a terminal', and it distinguishes this operation from the siblings by enumerating the concrete effects: 'cancel pending work, terminate its process group, and release its screen.' This clearly identifies what the tool does and why it is distinct from terminal_list, terminal_start, and the other siblings.

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 intended usage is clearly implied: use this tool when you need to shut down a terminal and clean up its associated process state. The description does not explicitly name alternatives or say 'when not to use', but the action word 'Close' plus the detailed effects provide enough context to select it over siblings. It lacks an explicit exclusion statement, so it falls just short of a 5.

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