Skip to main content
Glama

Stop a process on a QNX target

process_stop
DestructiveIdempotent

Stops a running process, such as a hung program or service you want to restart, by sending a signal and waiting for it to exit. Only processes whose executable lives below /tmp or /data are allowed.

Instructions

Stop a process that qnx-mcp did not start (for runs use run_stop), for example a hung program or a service you want to restart. Allowed only when its executable lives below /tmp or /data, checked on the target at call time: the executable in /proc//exefile (which also covers services started with a relative path such as ./statusd) and the same path with symlinks resolved. The process is identified by pid and start time; the start time, critical flag and executable are checked again right before each signal, and nothing is sent if they changed. Never pid 1, procnto, a critical process, qnx-mcp's runner, or anything in /proc/boot, /bin, /sbin, /usr or /system; refusals are process_not_allowed errors that name the rule. Sends signal (default TERM), waits up to grace_s for the process to exit and, with kill_after_grace, then sends SIGKILL. The result says what was stopped and whether it exited.

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>",
      "pid": "<pid>"
    },
    "name": "process_stop"
  }
}

Input Schema

NameRequiredDescriptionDefault
pidYesProcess id, from processes()
signalNoSignal to send firstTERM
targetYesTarget name such as 'tb' (lowercase letters, digits, '-', '_'); must be inside the server allowlist
grace_sNoSeconds to wait for the process to exit
kill_after_graceNoSend SIGKILL if it is still running after grace_s

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well past the annotations: it discloses that identity (pid + start time) is revalidated before every signal and nothing is sent if it changed, that refusals surface as process_not_allowed errors naming the rule, and the TERM-then-SIGKILL escalation with grace_s. This adds real safety context beyond destructiveHint=true.

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?

Front-loaded with the primary purpose and the exclusion routing before the dense safety rules; every clause carries operational weight. It is a single long, heavily parenthesized paragraph, which costs some readability but not content.

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 destructive, permission-gated mutation tool this covers eligibility, identity validation, refusal behavior, signal escalation, and outcome reporting; with an output schema present it need not describe return values. Nothing an agent needs to call it safely is missing.

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%, so the baseline is 3, but the description adds meaning the schema does not: signal defaults to TERM, grace_s is a wait window before escalation, and kill_after_grace triggers SIGKILL. It also explains the pid is paired with a start time for identity checking.

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 and resource ("Stop a process") and immediately scopes it to processes qnx-mcp did not start, naming the sibling run_stop for runs. An agent can distinguish this from target_stop and run_stop 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?

Explicit when-to-use with concrete examples (hung program, service to restart), an explicit when-not-to-use routing to run_stop, and the eligibility precondition that the executable must live below /tmp or /data. Very little is left to inference.

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