Skip to main content
Glama

run_command

Run shell commands in a sandbox and capture stdout, stderr, and exit code for safe execution from MCP clients.

Instructions

在沙箱中执行一条 shell 命令,返回 stdout、stderr 和退出码。注意:command 只填命令本身(如 echo hello),不要传 JSON 包装。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes要执行的命令
timeout_msNo超时毫秒数,默认 15000
Behavior3/5

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

The description discloses the return payload (stdout, stderr, exit code) and the sandbox context, which implies isolation. However, it does not mention potential side effects (e.g., resource usage, network access) or whether the command runs with any restrictions. Since annotations are absent, more behavioral detail would be helpful.

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?

The description is concise, consisting of one main clause and one clarifying note. It avoids unnecessary detail and is well-structured for quick comprehension.

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

Completeness4/5

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

Given the tool’s simplicity and lack of output schema, the description adequately explains the return format and provides usage guidance. It does not cover edge cases like error handling or timeouts beyond the schema’s timeout parameter, but for a basic shell execution tool this is sufficient.

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?

The schema already defines both parameters with descriptions, providing 100% coverage. The description adds a meaningful note about the command parameter (not JSON-wrapped), which supplements the schema without redundancy. Thus a score slightly above baseline is warranted.

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?

The description clearly states the tool executes a shell command in a sandbox, with a specific verb and resource. It also provides an example command, making the purpose unambiguous.

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?

Despite no sibling tools, the description includes a direct usage guideline: instructing the user to provide only the command itself without JSON wrapping. This clarifies the expected input format and preempts common misuse.

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/YYDW-1211/safe-agent-mcp'

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