Skip to main content
Glama

cmd_proc

Destructive

Inspect listening ports, stop the program on a port, shut down build servers, or delete stale bin/obj output to resolve port conflicts and locked-file build failures.

Instructions

Port, process and build-output helpers for a workspace, done by Waymark itself (no shell). Two actions change things: stop_port kills a program and clean_outputs deletes folders. ACTIONS and optionsJson keys (* = required): ports: port (1-65535, show only that port) - reads only: a PORT, PID, PROGRAM, ADDRESS table of listening TCP ports stop_port: port* - kills the program listening on that port with its child processes. Only a dotnet, Python or Node program, or one that runs from the workspace; never Waymark or a system process, and any other program is refused with its path. Nothing listening is not an error build_server: timeoutMinutes (1-10, default 2) - dotnet build-server shutdown: frees files that compiler servers keep locked after a build clean_outputs: path (folder, default the workspace), dryRun (true: only list) - deletes the bin and obj folders next to each .csproj, .fsproj or .vbproj; node_modules, .git, .vs and .idea are skipped WHEN TO USE: a port is already in use, a build fails because files are locked, or stale build output must go. Not for runs Waymark started (cmd_stop), building or running (cmd_project) or anything else (cmd_shell). Like every cmd_* call it may wait for the owner's approval. RETURNS: status, exit code and what was done (the ports table, each program ended or refused, each folder deleted or listed); a slow run returns a run id for cmd_wait.

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": {
      "workspace": "<workspace>",
      "action": "<action>",
      "purpose": "<purpose>"
    },
    "name": "cmd_proc"
  }
}

Input Schema

NameRequiredDescriptionDefault
guideNotrue: put the commands guide first in the result. Use on your first commands call, or when told it changed.
actionYesOne of: ports, stop_port, build_server, clean_outputs
purposeYesOne sentence: why you run this. The owner reads it before approving, sees it live, and it is kept in the audit log.
workspaceYesWorkspace name as shown in Waymark (a single workspace; '*' is not accepted)
optionsJsonNoJSON object with the options of the action, e.g. {"port":5000} or {"path":"src/Api","dryRun":true}. Unknown keys are refused. Omit when none are needed.
waitSecondsNoSeconds to wait for the result before returning a run id (default 30, at most about 45). The command keeps running; use cmd_wait to wait longer.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.2
    • changedInput schema / properties / optionsJson / description
      Previous value: -"JSON object with the options of the action, for example {\"port\":5000}. Omit when none are needed."New value: +"JSON object with the options of the action, e.g. {\"port\":5000} or {\"path\":\"src/Api\",\"dryRun\":true}. Unknown keys are refused. Omit when none are needed."
  2. Addedv0.2.1

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, and the description goes further by naming exactly which actions mutate state and what is destroyed (programs killed with child processes, bin/obj folders deleted next to project files). It also discloses the safety boundary (only dotnet/Python/Node or workspace-local programs; never Waymark or system processes; refusals return the path), the non-error case of nothing listening, dryRun listing, and skip rules for node_modules, .git, .vs and .idea.

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 one-line purpose and the mutation warning, then structured into ACTIONS, WHEN TO USE and RETURNS blocks with consistent formatting. Dense but nearly every clause carries unique information; the action list is somewhat terse per line but not padded.

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 multi-action, destructive tool with no output schema, the description still covers return contents (status, exit code, ports table, per-program and per-folder outcomes) and timeout behavior (run id plus cmd_wait). Nothing an agent needs in order to pick an action and 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 baseline is 3; the description earns a step above by documenting per-action optionsJson keys that the schema only illustrates by example — port range 1-65535, timeoutMinutes 1-10 with default 2, path defaulting to the workspace, dryRun semantics, and the fact that unknown keys are refused. It does not restate purpose/workspace/waitSeconds beyond the run-id tie to cmd_wait.

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?

Opens with a specific verb+resource framing (port, process and build-output helpers executed by Waymark, not a shell) and then enumerates four named actions with what each one does. An agent can tell cmd_proc apart from cmd_stop, cmd_project and cmd_shell from the text alone.

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 WHEN TO USE block gives concrete triggering conditions (port already in use, build fails on locked files, stale output must go) and explicitly excludes three alternatives by name with the reason for each exclusion. It even flags the approval-wait behavior shared by cmd_* calls.

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