Skip to main content
Glama

ssh_exec_cancel

Closes the execution channel for a background SSH command by job ID; this stops session tracking but does not guarantee the remote process has stopped.

Instructions

Close the execution channel of a background command. This does not guarantee a detached remote process has stopped.

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

Input Schema

NameRequiredDescriptionDefault
job_idYesJob ID returned by ssh_exec

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one key trait: closing the channel does not guarantee the detached remote process has stopped. That caveat is genuinely useful and non-obvious. However, it says nothing about whether the job record remains pollable afterward, what is returned, whether the operation is idempotent, or what happens if the job already completed.

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 short sentences with no waste: the action first, then the important caveat. Each sentence earns its place.

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?

For a one-parameter tool with no output schema, the definition covers the action and the main semantic caveat. It is still thin on post-call state (does the job disappear from ssh_exec_poll?) and on whether the remote process needs separate termination, both of which an agent would want before invoking it.

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?

There is a single parameter with 100% schema description coverage ('Job ID returned by ssh_exec'), so the schema already explains it. The description adds no format, validity, or error-handling detail about job_id beyond what the schema supplies, which is the expected baseline here.

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: 'Close the execution channel of a background command,' which clearly separates it from ssh_exec (start) and ssh_exec_poll (read output). It does not name those siblings, so an agent must infer the routing from the verb alone.

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 phrase 'background command' implies the tool applies only to jobs started in the background, and 'close the execution channel' implies use after you are done with a job. There is no explicit when-to-use, when-not-to-use, or named alternative (e.g., for killing the remote process versus just closing the channel).

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