Skip to main content
Glama

Stop a detached command

stop_command
DestructiveIdempotent

Terminate a detached command and every process it started. Sends SIGTERM, escalates to SIGKILL after 5 seconds, and returns the final history record and output.

Instructions

Stop a detached command. Sends SIGTERM to the command and every process it started, then SIGKILL to what is left after 5 s. Only a process started with detached can be stopped. The response carries the command's history record with its final state and output.

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": {
      "sandboxId": "<sandboxId>",
      "processId": "<processId>"
    },
    "name": "stop_command"
  }
}

Input Schema

NameRequiredDescriptionDefault
processIdYesProcess id returned by a detached command start.
sandboxIdYesPublic Sandbox id returned by create/list/get sandbox calls.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.0.0

TDQS

A4.5/5.0
Behavior5/5

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

The annotations already mark this as destructive and non-read-only, and the description adds substantial value beyond them: it names the exact signals (SIGTERM, then SIGKILL after 5 s), says the kill extends to every process the command started, and describes the returned history record with final state and output. This is exactly the behavioral context an agent needs before invoking a destructive stop.

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?

Three short sentences, front-loaded with the action and followed by mechanics, precondition, and response. Every sentence supplies distinct information with no repetition or filler.

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?

Although there is no output schema, the description explains what the response contains. For a destructive two-parameter command tool with strong annotation coverage, the definition supplies the escalation behavior, scope, precondition, and return value 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 `sandboxId` and `processId` are already well documented in the input schema. The description adds no further format, constraint, or interpretation details for either parameter. A baseline 3 is appropriate when the schema carries the parameter semantics.

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 opens with a specific verb and resource ("Stop a detached command") and immediately distinguishes the target: only processes started with `detached` can be stopped. It is clearly different from sandbox-level siblings like stop_sandbox and from read-oriented siblings like get_command.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states a clear precondition for use: the process must have been started with `detached`. That effectively excludes ordinary foreground commands. It does not name an alternative tool for stopping sandboxes or explain what to do with non-detached commands, so it stops short of a full when/when-not/alternative guide.

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