Skip to main content
Glama
Node Terminal MCP

Node Terminal MCP

by henryzhz

terminal_close

Permanently closes a terminal session, terminating its shell process and any running commands to free resources when the session is no longer needed.

Instructions

Close a terminal session permanently. This will terminate the shell process and free up resources. Use this when you no longer need a terminal session or want to clean up. Note: Any running processes in the terminal will be terminated.

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

Input Schema

NameRequiredDescriptionDefault
sessionIdYesTerminal session ID to close

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.8

TDQS

A3.7/5.0
Behavior4/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 well: it discloses permanence, that the shell process is terminated, that resources are freed, and that running processes in the terminal are killed. It omits error behavior for an unknown or already-closed sessionId and whether a new session must be created afterward.

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?

Three short sentences with the action front-loaded and the destructive warning placed at the end as a note. Slight redundancy between "terminate the shell process" and "running processes will be terminated," though the distinction between the shell and its children is meaningful.

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 close tool with no output schema, this covers purpose, effect, and usage timing sufficiently. The main gap is post-close semantics (session recovery, behavior on invalid IDs), which an agent might reasonably want before calling.

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?

Only one parameter exists and schema coverage is 100%, so the schema already documents sessionId as "Terminal session ID to close." The description adds no format, source, or validation meaning beyond that, which is the expected baseline for a fully documented single parameter.

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 gives a specific verb and resource ("Close a terminal session permanently") and adds the mechanism (terminate the shell process). It is clearly distinct in practice from siblings like terminal_write or terminal_read, but it never explicitly contrasts itself with them.

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?

"Use this when you no longer need a terminal session or want to clean up" is present but largely restates the purpose. There are no when-not conditions (e.g., what to do if you only want to detach, or how to recover a session afterward).

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