Skip to main content
Glama
KevinBuettner

docent-terminal-mcp

session_close

Terminate a tmux session and its processes. Logs and region files persist for days; only close sessions you own or that are unattached.

Instructions

Kill a session and whatever runs in it. Its logs and region files are kept on disk for a few days (session_logs keeps them for good, or deletes them). Refused for a session a person is attached to, and for another's while a command runs there: leave those to their owners, or ask the user to close it. Close what you are done with; a session another agent or a human started is theirs to close. A session that shares a window with others (a split) closes its own pane only; window closes them all.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
windowNoclose every session sharing this session's window (its split panes) too, not only this one
sessionYesthe session's name (from session_create or session_list)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so: it discloses retention behavior (logs and region files kept a few days, session_logs keeps or deletes them), refusal conditions, ownership constraints, and the split-pane vs whole-window destruction scope. This is exactly the context annotations would otherwise supply.

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?

Front-loaded with the core action, then layered with retention, refusal, ownership, and scope details. Dense and mostly waste-free, though the parenthetical about session_logs and the repeated ownership sentences could be tightened.

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?

An output schema exists, so return values need no explanation. Given the tool's mutation semantics and the absence of annotations, the description covers everything an agent needs: what is destroyed, what is retained, who may call it, and how splits behave.

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 coverage is 100%, so the schema already documents both parameters and the baseline is 3. The description adds practical meaning to `window` by framing the pane-vs-window distinction in usage terms ('closes its own pane only; window closes them all'), which goes slightly beyond the schema's mechanical wording.

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?

States a specific verb and resource ('Kill a session and whatever runs in it') and immediately differentiates from siblings by naming `session_logs` and the `window` flag. An agent can distinguish it from session_create/session_list/session_split without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit when-to-use ('Close what you are done with'), when-not (refused for attached sessions and for another's while a command runs), and alternatives ('leave those to their owners, or ask the user to close it'). Ownership rules are spelled out rather than left to inference.

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