Skip to main content
Glama

Close Session

close_session

Closes a specific SSH session by host, using a hostname, IP address, or SSH config alias; optionally specify port and username to target the session.

Instructions

Close a specific SSH session.

The host parameter can be either a hostname/IP or an SSH config alias.

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": {
      "host": "<host>"
    },
    "name": "close_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
hostYesHostname, IP address, or SSH config alias
portNoSSH port (optional, will use SSH config or default 22)
usernameNoSSH username (optional, will use SSH config or current user)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.2+p1

TDQS

B3.2/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 behavioral burden and falls short. It does not say whether running commands on the session are terminated, whether the close is reversible, what happens when the host does not match an open session, or what the result looks like.

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 sentences, front-loaded with the core action and no filler. The second sentence duplicates the schema's host description, so it is slightly wasteful but not harmful.

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?

Given a simple single-required-parameter tool, the basics are covered and the schema is self-documenting. However, with no annotations and no output schema, the definition should say more about side effects and failure modes to be fully 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 description coverage is 100%, so host, port, and username are already fully documented in the schema, including the alias and default-22 behavior. The description's sentence about host being a hostname/IP or SSH config alias merely restates what the schema already says, adding no new meaning.

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 and resource ("Close a specific SSH session"), which clearly identifies the operation. The word "specific" implicitly contrasts with the sibling close_all_sessions, but the description never names that sibling to make the distinction explicit.

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: an agent can infer this closes one session rather than all, but there is no explicit when-to-use guidance, no note about preferring close_all_sessions for bulk teardown, and no prerequisites such as an active session or authentication state.

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