Skip to main content
Glama

open-session

Open a named remote SSH session as a stateful interactive shell for commands needing persistent working directory and environment, or as a background session for long-running processes.

Instructions

Open a named session on a remote host. Use type="interactive" for stateful shell (CWD/env persists between commands) or type="background" for long-running processes.

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": "open-session"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesSession name (alphanumeric, dash, underscore, max 64 chars)
typeNoSession typeinteractive
ttlMsNoIdle timeout for THIS session in ms (the profile default applies when omitted). May shorten the profile timeout; may lengthen it only up to sessionBackgroundMaxMs for a background session, or not at all for an interactive one
commandNoCommand for background sessions
profileNoProfile name (uses default if omitted)

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. Changed1 schema field changedv2.26.0
    • addedInput schema / properties / ttlMs
      Added value: +{
      +  "description": "Idle timeout for THIS session in ms (the profile default applies when omitted). May shorten the profile timeout; may lengthen it only up to sessionBackgroundMaxMs for a background session, or not at all for an interactive one",
      +  "exclusiveMinimum": 0,
      +  "maximum": 9007199254740991,
      +  "type": "integer"
      +}
  3. First observedv2.5.0

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full behavior burden. It usefully discloses the key behavioral trait that interactive sessions persist CWD/env between commands while background sessions are for long-running processes. It omits lifecycle and failure behavior: name collisions, permission/auth requirements, and what happens on idle timeout remain undisclosed.

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?

Two tight sentences, the primary action front-loaded, and the mode-selection rule immediately after. No filler or redundant restatement of the tool name.

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?

For a five-parameter creation tool with no annotations and no output schema, the description says what is created and how to choose a mode but not what comes back (a session name/handle) that the agent would feed to read-session-output or run-command, nor how the session is later closed. Adequate but leaves a meaningful gap around lifecycle and return value.

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 all five parameters and the baseline is 3. The description adds real semantic value for the type enum by explaining the behavioral consequence of each mode, which the schema's bare "Session type" text does not convey.

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 clear verb (open) and resource (a named session on a remote host), and the second sentence distinguishes the two session modes. It does not differentiate itself from siblings such as run-command or close-session, so an agent must infer the boundary itself.

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?

Gives explicit selection guidance between type="interactive" and type="background", which is genuine when-to-use help. However, it never says when to prefer this tool over a sibling like run-command, nor does it mention prerequisites such as a required profile or host connectivity.

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