Skip to main content
Glama

close_session

Close a specific iTerm2 session by providing its session ID. Optionally force close without confirmation.

Instructions

Close a specific session.

:param session_id: The session UUID to close. :param force: If True, skip iTerm2's "running process" confirmation prompt.

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": "close_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
forceNo
session_idYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description must fully disclose behavior. It states the tool closes a session and describes the force parameter for skipping confirmation, but fails to mention destructive nature, impact on running processes, or error handling. Important behavioral traits are omitted.

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 extremely concise, comprising one line for the purpose and two lines for parameters. It is front-loaded with the action, and every sentence serves a purpose with no redundancy.

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

Completeness3/5

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

For a simple close operation with an output schema, the description covers purpose and parameters. However, it lacks guidance on usage context and behavioral transparency. Given the absence of annotations, more details about side effects or prerequisites would improve completeness.

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?

Despite 0% schema description coverage, the description provides meaningful parameter explanations: session_id is 'The session UUID to close' and force effect is detailed. This adds value beyond the schema's type/title, though no further details like valid formats or constraints are given.

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 'Close a specific session,' specifying the verb and resource. This distinguishes it from sibling tools like focus_session or get_active_session. The purpose is immediately clear, but the description is minimal and does not elaborate beyond the action.

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?

No guidance is provided on when to use this tool versus alternatives such as focus_session or split_pane. The description only explains the force parameter's effect, but offers no context for selecting close_session over other session manipulation tools.

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