Skip to main content
Glama

shell_command

Destructive

Run a shell command in the configured workspace and wait for its completion. Handles standard input, environment variables, and timeouts for quick local tasks.

Instructions

Run a shell command inside the configured workspace root and wait for it to finish. Use start_process for anything long-running.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
envNoEnvironment variables merged over the server environment.
shellNo
stdinNoText written to the command standard input, which is then closed.
commandYesCommand to execute.
workdirNoAbsolute path or path relative to the default workspace.
on_timeoutNoTerminate on timeout (default), or keep running as a managed background process.
timeout_msNoTimeout in milliseconds.
expect_exit_codeNoExpected exit code; a different result is reported as an error.
max_output_bytesNoMaximum combined stdout/stderr bytes (1024-4194304).
Behavior4/5

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

Adds useful behavioral context beyond the annotations: the command is awaited synchronously, and long-running work should be delegated to start_process. The destructive/open-world/read-only hints are already covered by annotations, so the description doesn't need to restate them, though it doesn't detail output handling or exit code reporting.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two concise sentences with no wasted words. The main behavior and workspace scope are front-loaded, and the important alternative is named immediately afterward.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with 9 parameters and no output schema, the description is adequate but minimal: it defines workspace root and blocking behavior, while return values and output capture are left implicit. Annotations and schema compensate for destructive hints and timeout/exit-code options, but the absence of any return-semantics note leaves a gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema documents 8 of 9 parameters clearly, so description-level parameter explanation is largely unnecessary. The description adds no parameter-specific detail, but with 89% schema coverage the baseline of 3 is appropriate; only the 'shell' parameter lacks a description, and its enum values communicate the choices.

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?

Clearly names the action ('Run a shell command'), the scope ('inside the configured workspace root'), and the blocking behavior ('wait for it to finish'). It also distinguishes itself from the sibling start_process by explicitly recommending that tool for long-running commands.

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?

Provides explicit routing guidance: use this tool for short commands that finish normally, and 'Use start_process for anything long-running.' This directly addresses the most likely alternative and gives a clear selection condition.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JonusNattapong/ChatGPTMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server