Skip to main content
Glama

cmd_stop

DestructiveIdempotent

Stops a Waymark command run: withdraws queued or approval-waiting runs and force-kills running processes with their child processes, then reports final status.

Instructions

Ends one command run. A run that still waits for approval or is queued is withdrawn and never starts. A running one is killed together with every process it started: a forced stop, so the program cannot clean up or save state. It then waits up to 8 seconds and reports the final state like cmd_wait. A run that already finished is left as it is and the reply gives its status; an unknown run id is an error. WHEN TO USE: to end an app that keeps running (run, py_run, node_run), a hung build or test, or a request you no longer want. For a program Waymark did not start that holds a port use cmd_proc stop_port; to find run ids use cmd_list.

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": {
      "runId": "<runId>"
    },
    "name": "cmd_stop"
  }
}

Input Schema

NameRequiredDescriptionDefault
guideNotrue: put the commands guide first in the result. Use on your first commands call, or when told it changed.
runIdYesThe run number to end, from a cmd_* result or cmd_list, for example 12.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • changedInput schema / properties / runId / description
      Previous value: -"The run number."New value: +"The run number to end, from a cmd_* result or cmd_list, for example 12."
  2. First observedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true, but the description goes well beyond them: it states that pending/queued runs are withdrawn and never start, that a running run is killed along with every process it started with no chance to clean up or save state, and that the call waits up to 8 seconds before reporting final state. It also covers the idempotent edge cases — an already-finished run is left untouched and an unknown id is an error.

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?

Behavior is front-loaded in the first sentence, consequences follow, and the WHEN TO USE block is clearly separated. The prose is dense but nearly every clause carries operational meaning; only the "like cmd_wait" comparison is slightly loose since it assumes knowledge of that sibling's reply.

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?

With no output schema, the description still tells the agent what the reply contains (final state / status of an already-finished run), the wait bound, and the error case. For a destructive one-parameter tool this covers everything needed to call it correctly.

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%, so both parameters are already documented, and the description only adds the sourcing hint that runId comes from a cmd_* result or cmd_list. The `guide` parameter is not mentioned at all in the description. Baseline 3 is appropriate when the schema carries the parameter detail.

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?

"Ends one command run" gives a specific verb and resource, and the following sentences delimit scope precisely (queued vs. running vs. already-finished runs). It is clearly distinguishable from cmd_wait (which reports state) and cmd_proc stop_port (which targets processes Waymark did not start).

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?

The explicit WHEN TO USE block enumerates concrete cases (a lingering app run, a hung build or test, an unwanted request) and names the correct alternative for the excluded case: cmd_proc stop_port for a process not started by Waymark. It also routes the agent to cmd_list to obtain run ids.

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