Skip to main content
Glama
ssh-remote-mcp
by wcbup

Start Detached Remote Background Job

ssh_bg_start
Destructive

Start a detached background command on a remote Unix or Windows server, logging output to a private temp file so jobs survive SSH disconnects.

Instructions

Start a non-interactive detached background command on a remote Unix or Windows server. Output is logged to a private remote temp file so the job and logs survive SSH disconnects. Requires explicit cwd.

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": {
      "target": "<target>",
      "cwd": "<cwd>",
      "command": "<command>"
    },
    "name": "ssh_bg_start"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdYesRequired remote working directory: explicit absolute path (e.g. /srv/app or C:\Services\app) or '~' for system-wide commands. Command aborts if cwd does not exist.
labelNoOptional human-readable label for the job
shellNoOptional shell override
targetYesSSH target as configured host alias, host, user@host, user@host:port, or [ipv6]:port. Never include remote paths in target.
commandYesCommand to run in the background

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (readOnly=false, destructive=true, openWorld=true, idempotent=false), the description discloses concrete behavior: output is redirected to a private remote temp file, jobs survive SSH disconnects, and the call aborts if cwd does not exist. It does not say what identifiers are returned so the job can later be referenced, nor that repeating the call spawns a duplicate job, which is relevant given idempotentHint=false.

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?

Three tight sentences with the core action front-loaded and operational caveats (log location, survival across disconnects, cwd requirement) following in a sensible order. 'Requires explicit cwd' is mildly redundant with the required-parameter list and the cwd field description, costing it a point.

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?

Because there is no output schema, the description should explain what a successful start returns so the agent can pair it with ssh_bg_status or ssh_bg_kill; it never mentions a job id, label handle, or log path retrieval. The remote log file location is described only vaguely ('private remote temp file'), leaving the follow-up workflow underspecified for a mutation-capable, non-idempotent tool.

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% and each parameter, including target formats, cwd examples, shell enum values, and label, is already documented in the schema. The description adds only 'Requires explicit cwd', which restates the required array and the cwd field description. Baseline 3 is appropriate since the schema carries the parameter burden.

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: 'Start a non-interactive detached background command on a remote Unix or Windows server.' The 'detached/background' qualifier distinguishes it implicitly from a foreground exec tool, and platform coverage (Unix or Windows) is explicit. It stops short of naming a sibling to contrast against, so a 4 rather than a 5.

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: 'detached background' plus 'output is logged... so the job and logs survive SSH disconnects' hints at long-running or disconnect-tolerant jobs. There is no explicit when-to-use vs. a foreground ssh_exec, and no when-not guidance (e.g., short commands, interactive sessions, or how to check on the job afterward).

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