Skip to main content
Glama

Stop a command on a Mac

cancel_mac_job
DestructiveIdempotent

Stops a running command and everything it started: SIGTERM, a second, then SIGKILL. It comes back exited with reason cancelled, its output so far still readable; a command that already ended comes back unchanged (cancelled: false). For a hung build, an endless test run or a server no longer needed.

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": "cancel_mac_job"
  }
}

Input Schema

NameRequiredDescriptionDefault
job_idYesCommand job ID (job_…) returned by exec_mac.
session_idNoMac session ID (ses_…). Optional: without it, the account's running Mac.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / session_id / description
      Previous value: -"Mac session ID (ses_…) returned by start_mac or list_mac_sessions."New value: +"Mac session ID (ses_…). Optional: without it, the account's running Mac."
    • changedInput schema / required
      Previous value: -[
      -  "session_id",
      -  "job_id"
      -]New value: +[
      +  "job_id"
      +]
  2. Changed2 schema fields changed
    • removedInput schema / $schema
      Removed value: -"http://json-schema.org/draft-07/schema#"
    • changedOutput schema / (root)
      Previous value: -{
      -  "$schema": "http://json-schema.org/draft-07/schema#",
      -  "additionalProperties": {},
      -  "description": "The JSON response of the NoMac API for this operation",
      -  "properties": {
      -    "error": {
      -      "additionalProperties": {},
      -      "description": "Present only when the call failed",
      -      "properties": {
      -        "code": {
      -          "description": "Stable machine-readable error code, for example insufficient_credit",
      -          "type": "string"
      -        },
      -        "message": {
      -          "description": "What went wrong and what to do next",
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "code",
      -        "message"
      -      ],
      -      "type": "object"
      -    }
      -  },
      -  "type": "object"
      -}New value: +null
  3. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only flag destructive=true and idempotent=true; the description goes well beyond them by disclosing the escalation sequence (SIGTERM, one second, SIGKILL), that child processes are included, and the resulting state (exited with reason cancelled, output so far still readable). It also documents idempotent behavior concretely: an already-finished command returns unchanged with cancelled: false.

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 escalation, then the outcome, then the use cases. Every clause carries information — no restatement of the title 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?

With no output schema, the description still covers the return contract (exited/cancelled, partial output readable), the kill semantics, and the no-op case, which is everything needed to invoke a destructive two-parameter tool safely.

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%, with job_id and session_id both documented including format patterns and the optional fallback to the account's running Mac, so the schema does the heavy lifting. The description adds no parameter-level detail, which is the expected baseline here.

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 — 'Stops a running command and everything it started' — and immediately scopes it to the whole process tree. This clearly separates it from exec_mac (starts) and get_mac_job (observes), so an agent can pick it without opening another schema.

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?

The final sentence gives concrete triggering conditions ('a hung build, an endless test run or a server no longer needed'), and the description explains the no-op case for an already-ended command. It never names a sibling alternative explicitly, so it stops short of full when-versus-what guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources