Skip to main content
Glama

ssh_job_stop

Destructive

Stops a background SSH job by terminating its whole process group, escalating to SIGKILL after 5 seconds; optionally deletes the job's log directory, including for finished jobs.

Instructions

Stop a background job (SIGTERM, then SIGKILL after 5s, whole process group). With remove=true also delete its log directory (works for finished jobs too).

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>",
      "job_id": "<job_id>"
    },
    "name": "ssh_job_stop"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYes
removeNo
targetYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructive=true and openWorldHint=true, so the description only needs to add detail, and it does: the graceful-then-forced signal escalation with a 5s window, process-group-wide scope, and the fact that remove=true deletes the log directory. The one gap is that it doesn't say what happens to an already-finished or nonexistent job.

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, zero filler. The core action and signal sequence are front-loaded, and the destructive remove behavior is scoped in a separate clause so it cannot be missed.

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 three-parameter destructive tool with an output schema (so return values need no explanation) and annotations covering the safety profile, this is nearly complete. The remaining gap is failure behavior for invalid or already-terminated job IDs.

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 0%, so the description carries the burden, and it defines the non-obvious `remove` parameter well, including its destructive side effect and that it applies to finished jobs. `target` and `job_id` are left to their names, which are reasonably self-evident given siblings like ssh_list_targets, but no format or identification guidance is given.

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+resource ('Stop a background job') and immediately qualifies it with the exact mechanism: SIGTERM, then SIGKILL after 5s, applied to the whole process group. That is enough to separate it from ssh_job_start, ssh_job_status, and ssh_job_list without needing to name them.

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 parenthetical 'works for finished jobs too' tells the agent when the remove path is valid, which is genuinely useful. However, there is no guidance on when to stop versus inspect first (ssh_job_status), nor any exclusion such as what happens if the job is already gone.

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