Skip to main content
Glama

close_session

Terminate an interactive session to stop output capture and free resources. Specify a session ID, or omit it to use the active session.

Instructions

Close and terminate an interactive session.

Args: session_id: Target session ID to close (defaults to active session).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
session_idNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden, and it discloses little beyond the word "terminate." It does not say whether the session can be resumed, whether buffered output/history is discarded, whether this is irreversible, or whether closing the active session is safe.

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?

Two short lines that front-load the purpose before the argument note. The "Args:" block is mild boilerplate, but nothing here is wasted.

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?

An output schema exists, so return values need not be explained. However, for a destructive, zero-annotation, single-parameter mutation tool, the description should state at least whether the termination is permanent and what happens to session state; that gap is only partially offset by the parameter default note.

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?

Schema description coverage is 0%, yet the description compensates by explaining the single parameter's purpose and its default behavior ("defaults to active session"), which the schema only expresses as default: null. This is meaningfully more than the schema alone conveys.

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 plus resource ("Close and terminate an interactive session"), which is immediately actionable. It does not differentiate itself from siblings like switch_session or spawn, so an agent must infer the boundary on its own.

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 when-to-use or when-not-to-use guidance. With siblings such as switch_session and list_sessions present, the description never says why an agent would close a session instead of switching away from it, leaving the routing decision entirely to inference.

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