Skip to main content
Glama

shell_exec

Run shell commands on the local host with configurable timeout, output size, working directory, and optional shell usage. Supports stdin input and stderr merging.

Instructions

Run a shell command on the local host and return its combined output.

Timeout and output size are clamped to the server limits. Set use_shell=false to exec an argv without a shell.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
timeoutNo
max_outputNo
cwdNo
stdinNo
merge_stderrNo
use_shellNo
env_jsonNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

Annotations are absent, so the description must cover behavior. It notes clamping and the use_shell option, but omits security implications, blocking behavior, error handling, and other safety concerns for running shell commands.

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?

The description is short (three sentences) and front-loaded with the main purpose. However, it could be more structured to cover parameters better without becoming verbose.

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

Completeness2/5

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

Given the complexity (8 params, no schema descriptions), the description is too minimal. It only addresses the core use case and one parameter, leaving the agent to guess about others. Output schema exists but doesn't compensate for missing param docs.

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

Parameters1/5

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

With 0% schema description coverage and 8 parameters, only 'use_shell' is mentioned. The meaning of parameters like cwd, stdin, merge_stderr, env_json, and how they affect execution is not explained.

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 runs a shell command locally and returns combined output. It distinguishes from sibling tools like shell_spawn (interactive) and ssh_* (remote execution).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions timeout/output clamping and the use_shell flag, but does not explicitly state when to use this tool vs alternatives like shell_script or shell_spawn. Some guidance is present but incomplete.

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/rmednitzer/relay-shell'

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