Skip to main content
Glama
slepp
by slepp

ssh_start_session

Start a new persistent interactive SSH session to a remote host, returning a session ID and initial output for subsequent commands.

Instructions

Start a new persistent interactive SSH session backed by a local PTY. Returns the session id, initial output, and observer metadata. If 'truncated' is true or 'pending_output_chars' > 0 in the response, call ssh_read_session to retrieve the remaining buffered output. For most agent workflows, prefer ssh_ensure_session instead — it reuses existing sessions and avoids accidental duplicates.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoRemote directory to cd into at session start.
envNoRemote environment variables to export at session start.
portNo
shellNoRemote shell executable to launch.
targetYesOpenSSH target such as host, alias, or user@host.
auto_closeNoWhen true, the session is automatically cleaned up after the remote shell or command exits. Use for one-shot long-running commands where you want session-style output streaming but don't need the shell afterwards. Default: false.
session_nameNoStable name for this session, used for recovery and reuse across tool calls. Choose a short, descriptive kebab-case name reflecting the task, e.g. 'deploy-staging', 'tail-api-logs', 'debug-worker-3'. This name also appears in tmux session listings for human observers. Strongly recommended for any multi-step workflow.
wait_secondsNoSeconds to wait for initial output. Default: 1.0.
identity_fileNo
observer_modeNoPassive observer mode. Defaults to 'tmux' and falls back to transcript-only observation if tmux is unavailable. 'transcript' always records a transcript and returns a local follow command.
extra_ssh_argsNoAdditional ssh(1) flags passed verbatim, e.g. ["-J", "jumphost"]. Prefer the dedicated port, identity_file, and strict_host_key_checking parameters.
known_hosts_fileNo
max_output_charsNo
strict_host_key_checkingNoBoolean or one of yes, no, ask, accept-new, off.
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals that the session is persistent, interactive, backed by a local PTY, and that output may be buffered (truncated/pending_output_chars) requiring a follow-up call. It does not describe cleanup, side effects, or failure modes, but the persistence and buffered-output behavior are meaningfully disclosed.

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 four sentences and front-loads the core purpose. It efficiently covers the tool's function, return values, follow-up handling, and alternative tool recommendation without redundancy or unnecessary detail. Every sentence earns its place.

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?

Considering the complexity (14 parameters, no output schema, no annotations), the description provides a clear operational flow: start session, check truncated/pending_output_chars, read remaining output, and prefer ssh_ensure_session. It covers the primary invocation patterns adequately, though it could benefit from more on session lifecycle (e.g., cleanup, auto_close behavior) which is only partially covered in the schema.

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 71%, and most parameters already have descriptions in the schema. The description adds operational context (e.g., reading remaining output via ssh_read_session) but does not elaborate on individual parameter usage beyond what the schema provides. Since the schema does most of the heavy lifting, the description's contribution is marginal.

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?

The description clearly states the tool's function: 'Start a new persistent interactive SSH session backed by a local PTY.' It specifies the resource (SSH session) and the action (start), and distinguishes it from sibling tools by explicitly recommending ssh_ensure_session for most workflows. The description also notes the return values (session id, initial output, observer metadata), making the purpose concrete.

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?

The description provides explicit usage guidance: it explains when to call ssh_read_session (if truncated or pending_output_chars > 0), and when to prefer ssh_ensure_session instead ('For most agent workflows, prefer ssh_ensure_session instead — it reuses existing sessions and avoids accidental duplicates'). This directly addresses the when-to-use vs alternatives criterion.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/slepp/ssh-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server