Skip to main content
Glama

close-session

Destructive

Closes a named SSH session by ending its interactive shell or signalling a background command (INT, then TERM, then KILL) before dropping the channel.

Instructions

Close a named session. A background session's command is signalled on the host (INT, then TERM, then KILL) before its channel is dropped; an interactive session's shell is ended. The response says so if the command could not be signalled or had not stopped in time.

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": {
      "name": "<name>"
    },
    "name": "close-session"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesSession name to close
profileNoProfile name

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2.31.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observedv2.5.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare destructiveHint=true; the description goes well beyond that by disclosing the escalation sequence (INT, then TERM, then KILL) on the host, that the channel is dropped, and that the shell is ended for interactive sessions. It also promises the response reports failures to signal or stop. It stops short of saying whether the operation is irreversible or what happens if the session name doesn't exist, which is the remaining gap for a destructive tool.

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 compact clauses, front-loaded with the action, then the behavioral detail ordered by session type, then the response guarantee. No filler and nothing restated from the name.

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 two-parameter destructive tool with no output schema, the description covers the key mechanics and error reporting. Missing are the failure/edge cases an agent would want – nonexistent session, permission requirements, or idempotency – which keeps it a notch below complete.

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 documented, and the description only restates 'named session' without adding format, naming conventions, or whether the profile parameter selects which host the session lives on. Baseline 3 is appropriate when the schema carries the semantics.

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?

"Close a named session" states a specific verb and resource, and the follow-up sentences distinguish a background session (command signalled, channel dropped) from an interactive one (shell ended). An agent can tell this apart from open-session or signal-process without opening a schema.

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?

Usage is only implied by the verb 'close' – there is no explicit statement of when to choose this over signal-process for terminating a running command, and no preconditions (e.g., must the session exist, is it idempotent). The background-vs-interactive split hints at the decision boundary but doesn't spell out alternatives.

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