Skip to main content
Glama

open-session

Opens a named remote SSH session for stateful interactive shells with persistent CWD/env, or for long-running background 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.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"
      +}
  2. 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 provided, so the description carries the full behavioral burden. It usefully discloses that interactive sessions persist CWD/env between commands and that background sessions are for long-running processes, but it omits session lifecycle details such as cleanup, resource usage, return value, and what happens when the session times out.

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?

The description is two tightly written sentences with no wasted wording. The primary purpose is front-loaded, followed immediately by the most important mode-selection guidance.

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 session-creation tool with five parameters, no annotations, and no output schema, the description covers purpose and session-type behavior adequately. It does not address lifecycle or return information, such as whether the session name is used later by close-session or read-session-output, leaving meaningful gaps for an agent coordinating session tools.

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 baseline is 3. The description adds meaningful semantics for the type parameter by explaining the behavioral distinction between 'interactive' and 'background' values, which the schema only labels generically as 'Session type'. The other parameters are left to the schema.

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?

The description gives a specific verb and resource: 'Open a named session on a remote host.' This distinguishes it from sibling tools like close-session, read-session-output, and list-sessions by making clear it creates rather than manages or lists sessions. It stops short of explicitly naming siblings, so it is clear but not fully differentiating.

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?

The description gives useful mode-selection guidance: use interactive for a stateful shell or background for long-running processes. However, it does not explain when to choose open-session over alternatives such as run-command, nor does it state prerequisites or lifecycle expectations.

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