Skip to main content
Glama

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 user 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

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.6/5.0
Behavior4/5

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

Annotations already flag destructiveHint/openWorldHint, but the description adds genuinely non-redundant behavior: permission semantics ('Full Access uses the user account's rights; scoped grants keep their restrictions'), the ~2-second inline-vs-async return split, the instruction not to resend the call, and the metering rule (one execution per call). The only small gap is that the consequence of a destructive command (irreversibility, confirmation expectations) is implied rather than stated.

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 use case, then exclusions, then mechanics — a sensible order with no filler sentences. It is dense and long-ish, and the timeout/follow-up sentence packs several distinct behaviors together, but each clause carries operational information.

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 destructive, open-world execution tool with no output schema, it supplies everything needed: prerequisites, permission model, timeout semantics, metering, the async result pattern and how to recover output, and the safety exclusion. An agent could call this correctly without opening any sibling tool description.

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 still adds value by tying sessionId to execution_session_open, requiring a *new* operationId, and clarifying that timeoutMs is process lifetime (up to 24 hours) as distinct from the queue-admission deadline in deadlineAt. It does not cover cwd/args/efficiencyProfile, but those are well documented in the schema.

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 and resource paired to a real user intent ("asks to run a command on the approved computer"), then enumerates the concrete classes of commands covered (build, test, Git, package manager, PowerShell, inspect-only). It distinguishes itself from siblings by naming operation_status/operation_output/operation_cancel as the follow-up path rather than alternatives, so an agent knows this is the single execution entry point.

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?

Gives an explicit when-to-use clause, a hard when-not-to-use exclusion ('Do not use to scan or probe hosts other than this computer (port scans, host discovery, vulnerability checks); decline those instead'), and names the sibling tools for lifecycle follow-up. Prerequisites (sessionId from execution_session_open, a new operationId) are stated outright.

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.