Skip to main content
Glama

ssh_exec_background

Run long-running SSH commands in a detached background subshell to avoid client timeouts, then poll task logs and status by taskId.

Instructions

Launch long-running command in a detached background subshell (avoids client timeout). Returns a taskId to poll logs and status.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
targetNoOptional SSH connection target. If omitted, uses default profile (homelab).
commandYesLong-running command (e.g. docker compose build, npm build).
taskTagNoHuman-readable tag prefix for taskId (e.g. "deploy", "cronjob").
workingDirNoRemote working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does add real value: it discloses the detached subshell mechanism, the timeout-avoidance rationale, and that a taskId is returned as the handle for later polling. It omits failure/auth behavior and whether logs persist, but the core lifecycle is conveyed.

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 sentences, front-loaded with the action and mechanism, then the return contract. No filler; every clause 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?

For a background-exec tool with no output schema and a fully documented nested target schema, the description supplies the key missing piece: the return value (taskId) and its polling purpose. Remaining gaps (error handling, log retention) are minor.

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%, including the nested target object, so the schema already defines every parameter. The description only references taskId implicitly via polling, adding nothing beyond what the structured fields provide — the baseline 3.

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?

States a specific verb (launch) and resource (long-running command) plus the execution mode (detached background subshell). This implicitly distinguishes it from the synchronous ssh_exec sibling, since an agent knows foreground vs background from the description alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Long-running command" and "avoids client timeout" give a clear condition for selecting this over ssh_exec, and the mention of polling logs/status points toward ssh_task_poll. It stops short of explicitly naming those siblings or stating when NOT to use it.

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