Skip to main content
Glama

close_session

Terminate a named terminal session and optionally close its tab to clean up unused sessions.

Instructions

Close a named terminal session and optionally close its tab. Use to clean up sessions that are no longer needed. Pass close_tab: true to also close the terminal tab.

Input Schema

NameRequiredDescriptionDefault
close_tabNoIf true, also closes the terminal tab (default: false)
session_nameYesName of the session to close

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv8.0.4

TDQS

A3.6/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the session closes and that a tab may close, but it omits whether running processes are terminated, whether closure is irreversible, and what happens if the session does not exist.

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?

Three short sentences with zero filler, front-loaded with the action and use case. Every sentence contributes useful information.

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?

A simple two-parameter tool with rich schema but no annotations or output schema. The description covers the main operation and optional tab behavior, though it could say more about destructive effects and relation to bulk cleanup siblings.

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%, so both parameters are already fully documented. The description reinforces the close_tab usage but adds no format or edge-case semantics beyond the schema baseline.

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?

States a specific verb ('close') and resource ('named terminal session'), and clarifies the optional tab closure. It is clear, but it does not explicitly distinguish itself from sibling cleanup_sessions or list_sessions.

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?

Explicitly says to use it to clean up sessions that are no longer needed, giving clear context. It does not state when-not conditions or mention alternatives such as cleanup_sessions, so it is not a 5.

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