Skip to main content
Glama
pmboxbiz

mcp-ssh-live

by pmboxbiz

ssh_signal

Send POSIX signals (TERM, KILL, INT, etc.) to a remote SSH job, using channel signal or PID-based kill fallback. Optionally wait for job exit and return exit status.

Instructions

Deliver a POSIX signal (TERM, KILL, INT, HUP, QUIT, USR1, USR2, STOP, CONT, and a few others) to a job started by ssh_spawn. Use TERM (polite, the default) for graceful shutdown; use KILL only when TERM fails to stop the job within a reasonable window.

Delivery strategy: we first try paramiko's in-channel send_signal (often ignored by OpenSSH sshd), then fall back to 'kill - ' on a fresh SSH session using the PID captured at spawn time. Both paths are attempted unless use_pid_fallback=False.

Pass wait_ms > 0 to block up to that many milliseconds waiting for the job to actually exit; the response then includes the real exit_status. Otherwise we return immediately with still_running indicating whether the signal took effect within the fire-and-forget window.

Common patterns:

Polite stop, wait up to 5 s:

ssh_signal(job_id, 'TERM', wait_ms=5000)

Hard kill, don't wait (verify via ssh_tail later):

ssh_signal(job_id, 'KILL')

Interrupt (like Ctrl-C):

ssh_signal(job_id, 'INT')

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
job_idYesThe id returned by ``ssh_spawn``.
signalNoSignal name (``"TERM"``, ``"SIGTERM"``, ``"kill"``, …) or POSIX number (``9``, ``"9"``). Case-insensitive. Defaults to ``"TERM"`` — the polite choice.TERM
wait_msNoIf > 0, after delivering the signal we block up to this many milliseconds for the job's done_event to fire, and report the real ``exit_status`` in the response. Capped internally at 30000 ms. A value of 0 (default) returns immediately.
use_channelNoWhen True (default), try paramiko's in-channel ``send_signal`` first. Set to False to skip this path entirely — occasionally useful on a server known to reject it in ways that leave the channel in a bad state.
use_pid_fallbackNoWhen True (default), open a fresh SSH session and run ``kill -<SIG> <pid>``. Requires the job to have been spawned with PID capture enabled (which is always the case via ssh_spawn). Set to False if you specifically want to verify whether ``channel.send_signal`` alone works on your server.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Despite no annotations, the description fully discloses the delivery strategy (paramiko send_signal then kill via SSH), wait behavior and cap, and the effect of boolean parameters. This is comprehensive and leaves no ambiguity.

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?

The description is well-organized with a summary, strategy, examples, and parameter details. Every sentence adds necessary information, and it front-loads the core purpose.

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?

Given the presence of an output schema, the description covers all needed aspects: purpose, usage, behavior, parameters, and common patterns. No missing context for an agent to correctly invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema coverage, the description still adds significant value by explaining job_id origin, signal naming flexibility, wait_ms blocking with cap, and the purpose of use_channel and use_pid_fallback. It goes beyond the schema.

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?

The description clearly states the tool delivers a POSIX signal to a job spawned by ssh_spawn. It lists specific signals, default behavior, and distinguishes from sibling tools like ssh_spawn and ssh_tail.

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?

Provides explicit guidance on when to use TERM vs KILL, explains fallback strategy, and gives common usage patterns with examples. It effectively tells the agent how to select and invoke the tool correctly.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pmboxbiz/mcp-ssh-live'

If you have feedback or need assistance with the MCP directory API, please join our Discord server