Skip to main content
Glama

Local Commander

Run command

command_run
DestructiveIdempotent

Use this when the user asks to run a command on the approved computer, such as a build, test, Git, package manager or PowerShell command, including commands that only inspect state. Full Access uses the Windows account's rights; scoped grants keep their restrictions. timeoutMs is the process lifetime, up to 24 hours; a long command returns its running IDs in about two seconds, then follow it with operation_status/operation_output and stop it with operation_cancel. Do not use to scan or probe hosts other than this computer (port scans, host discovery, vulnerability checks); decline those instead. Needs the sessionId from execution_session_open and a new operationId; each call is metered as one execution. A short result is returned inline within about two seconds; otherwise keep the returned IDs for operation_status and operation_output and do not resend the call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoWorking folder relative to the selected project root (or the workspace root); omit for the root
argsNoArguments as separate strings
commandYesExecutable name or path, for example node, npm, git or powershell
sessionIdYesexecutionSessionId returned by execution_session_open
timeoutMsNoProcess lifetime limit in ms, 100-86400000 (default 60000)
deadlineAtNoOptional UTC admission deadline at most 60 seconds ahead (queue start timeout, NOT process execution lifetime)
operationIdYesA new random UUID v4 for this call; reuse it only to retry this same call
idempotencyKeyNoOptional retry key, 8-128 chars of [A-Za-z0-9._:-]; defaults to operationId
efficiencyProfileNoOptional, unverified label of the client's model, recorded as display metadata in the device owner's local activity statistics. Omit when unknown. Never send credentials or conversation content.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: explains the Full Access vs scoped-grant rights model, that timeoutMs is process lifetime capped at 24 hours, that long commands return running IDs in ~2 seconds, that each call is metered as one execution, and that a returned call must not be resent. This is exactly the extra context annotations cannot convey.

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 primary use case and the critical when-not rule, and every sentence carries information (timeouts, metering, follow-up IDs, retry rule). The sentences are long and dense, which costs a point, but there is no 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?

For a high-complexity, 9-parameter, nested-object tool with no output schema, the description covers execution lifetime, result-return modes (inline vs IDs), required identifiers, metering, and the follow-up/stop tools. Nothing an agent needs to call it correctly 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?

With schema coverage at 100% the baseline is 3, but the description adds operational meaning: timeoutMs is framed as process lifetime rather than a queue/admission timeout, operationId is a fresh UUID reusable only for retrying the identical call, and sessionId's origin is restated. deadlineAt and efficiencyProfile are left to the schema, but the required-parameter semantics are clarified.

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+resource ('run a command on the approved computer') and enumerates concrete command families (build, test, Git, package manager, PowerShell). It also carves out scope versus siblings by deferring host-scanning to a decline and pointing at operation_status/operation_output/operation_cancel for follow-up.

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 trigger ('when the user asks to run a command'), explicit exclusion ('Do not use to scan or probe hosts other than this computer... decline those instead'), and named prerequisites ('Needs the sessionId from execution_session_open'). It even names the sibling tools for continuing a long-running command.

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