Skip to main content
Glama
cygnussystems

cygnus-ssh-mcp

Official

ssh_task_launch

Launch a command in the background and return its PID right away for long-running tasks like installs, backups, or downloads; check status or read log files anytime.

Instructions

Launch a command in the background and return its PID immediately, without waiting for it to complete.

Prefer this over ssh_cmd_run for commands that will take a long time or may be quiet for extended periods: package installs, container/image pulls, large downloads, backups, compilation. It avoids holding a blocking tool call open and the ambiguity of io_timeout - the PID it returns survives reconnects and can be checked anytime with ssh_task_status(pid), and stdout_log/stderr_log can be read with ssh_file_read while the task is still running.

Output is redirected to files (see stdout_log/stderr_log), not captured in memory - read the log files to see progress or final output.

Windows targets: the command runs under cmd.exe (CMD syntax); for PowerShell use powershell -NoProfile -Command "...".

On Linux/macOS the launch FAILS with an error (nothing is started) if a log file can't be created, or, with use_sudo, if sudo itself fails - so a returned PID always means the task was really started. With use_sudo, logs in a directory only root can write are created and written as root.

Returns: {'command', 'pid', 'start_time', 'stdout_log', 'stderr_log'}. Both are the paths the output really goes to on the remote host (read them with ssh_file_read), or None for a stream that's discarded - both are None if log_output=False, and stdout_log is None if you passed only stderr_log. With neither passed, the default is /tmp/task-<pid>.log on Linux/macOS (both streams in one file), and C:\Windows\Temp\task-<pid>.log plus task-<pid>_err.log on Windows.

Long-running calls: if this takes longer than the server's wait cap (default 50s), it
returns {"status": "in_progress", "handle_id": ...} instead of the result - the work keeps
running. Get the result by polling ssh_cmd_check_status(handle_id=...), which returns this
tool's normal response once finished. Do not call it again meanwhile. Only one such
operation runs at a time; another one started meanwhile fails with a 'busy' error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesCommand to execute in the background
use_sudoNoRun command with sudo
log_outputNoWhether to log output to files
stderr_logNoPath to redirect stderr (default: same file as stdout on Linux/macOS; a sibling <name>_err.log on Windows). The response's stderr_log always gives the real path.
stdout_logNoPath to redirect stdout (default: /tmp/task-<pid>.log on Linux/macOS, C:\Windows\Temp\task-<pid>.log on Windows)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.6.1
    • changedInput schema / properties / stderr_log / description
      Previous value: -"Path to redirect stderr (default: same as stdout)"New value: +"Path to redirect stderr (default: same file as stdout on Linux/macOS; a sibling <name>_err.log on Windows). The response's stderr_log always gives the real path."
    • changedInput schema / properties / stdout_log / description
      Previous value: -"Path to redirect stdout (default: /tmp/task-<pid>.log)"New value: +"Path to redirect stdout (default: /tmp/task-<pid>.log on Linux/macOS, C:\\Windows\\Temp\\task-<pid>.log on Windows)"
  2. First observedv1.3.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full behavioral burden and does so thoroughly: output goes to files not memory, log files must be readable or nothing starts, sudo log ownership, Windows cmd.exe vs PowerShell semantics, and the wait-cap/in_progress/ssh_cmd_check_status polling flow including the single-operation 'busy' constraint. This is far beyond what structured fields provide.

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?

It is long but front-loaded and segmented into thematic blocks (usage preference, output redirection, Windows, failure semantics, Returns, long-running calls), so each section is scannable. Minor duplication of default log paths already present in the schema keeps it from a 5.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter background-execution tool with platform divergence, async handle polling, and sudo behavior, the description covers failure modes, return shape, and alternate paths comprehensively. An agent has everything needed to call it correctly and to recover when it returns in_progress.

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%, but the description still adds meaning: it explains what a None log path means (stream discarded), the interaction between stdout_log and stderr_log, platform-specific defaults, and that with no paths passed both streams go to one file. That is genuine semantics beyond the schema text.

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?

Opens with a precise verb+resource+behavior: 'Launch a command in the background and return its PID immediately, without waiting for it to complete.' This cleanly separates it from ssh_cmd_run, which the description names explicitly, so an agent can route between the two without opening either schema.

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?

Explicitly states when to prefer this tool ('long time or may be quiet') and gives concrete examples (package installs, image pulls, backups, compilation), while naming the alternative and the reason it is avoided (io_timeout ambiguity). It also routes follow-up work to ssh_task_status and ssh_file_read.

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