cmd_proc
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
| Name | Required | Description | Default |
|---|---|---|---|
| guide | No | true: put the commands guide first in the result. Use on your first commands call, or when told it changed. | |
| action | Yes | One of: ports, stop_port, build_server, clean_outputs | |
| purpose | Yes | One sentence: why you run this. The owner reads it before approving, sees it live, and it is kept in the audit log. | |
| workspace | Yes | Workspace name as shown in Waymark (a single workspace; '*' is not accepted) | |
| optionsJson | No | 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. | |
| waitSeconds | No | Seconds 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. |