Skip to main content
Glama

cmd_shell

Destructive

Run shell scripts on the owner's computer to inspect hardware, OS settings, apps, processes, network, disks, and files outside workspaces. Each script needs owner approval before execution.

Instructions

Run a script in the computer's shell (PowerShell or cmd on Windows, zsh or bash on macOS - chosen automatically unless you name one). This is the owner's real computer, and this can do anything the owner's user account can do, so EVERY call waits for the owner to read the script and approve it in the Waymark admin UI; it can never run by itself. The owner may edit the script before approving. USE IT for any question about the computer itself, not only projects: displays and monitors, hardware, OS version and settings, installed apps, running processes, network, disks, files outside a workspace. Leave workspace out for these system scripts. Do not tell the user you cannot reach their computer; run a read-only script instead. For project work prefer the typed tools (cmd_project, cmd_git, cmd_proc) when one fits: they are checked and can run without waiting. Write the script for the shell that will run it; a short script that does one thing is approved faster. Nothing can be typed to it while it runs. RETURNS: result and the end of the output; waits up to waitSeconds (the owner needs time to approve - use 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": {
      "script": "<script>",
      "purpose": "<purpose>"
    },
    "name": "cmd_shell"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoOptional start folder: relative to the workspace, or a full path when no workspace is given.
guideNotrue: put the commands guide first in the result. Use on your first commands call, or when told it changed.
shellNoOptional shell: pwsh, powershell, cmd, zsh, bash or sh. Leave empty to let Waymark pick the best one installed.
scriptYesThe script text.
purposeYesOne sentence: why you run this. The owner reads it before approving, sees it live, and it is kept in the audit log.
workspaceNoOptional workspace name. With it the script starts in the workspace folder; without it the script is a system script and starts in the home folder.
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.
timeoutSecondsNoTime limit in seconds (5-3600, default 300).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the destructive/not-readOnly annotations by disclosing the human approval gate on EVERY call, that the owner may edit the script before approving, that nothing can be typed while it runs, and the timeout/wait semantics. This is exactly the extra context an agent needs for a high-risk, non-idempotent tool, and nothing contradicts the annotations.

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 core action, then scope, then alternatives, then return behavior — a sensible ordering with almost no filler. A few sentences are long and the approval rationale is restated in several places, costing some tightness without losing clarity.

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 an 8-parameter, arbitrary-code-execution tool with no output schema, the description still covers the approval workflow, the return value ('result and the end of the output'), the wait/timeout relationship, and the workspace-vs-system distinction. An agent has everything needed to call it correctly and safely.

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 the baseline is 3, but the description adds real meaning: leaving workspace empty makes it a system script starting in the home folder, shell is auto-selected unless named, and waitSeconds interacts with the owner's approval time (use cmd_wait). It also advises writing for the target shell and keeping scripts short because short scripts are approved faster.

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 ('Run a script in the computer's shell') and immediately delimits the shell choice by platform. It is distinguishable from the typed siblings (cmd_project, cmd_git, cmd_proc) which are named as the preferred path for project work.

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?

Explicit when-to-use ('any question about the computer itself, not only projects' with a concrete list of system topics), explicit when-not (project work goes to the typed tools 'when one fits'), and explicit alternatives with the reason they are better ('they are checked and can run without waiting'). It even counters a common failure mode: 'Do not tell the user you cannot reach their computer; run a read-only script instead.'

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