Skip to main content
Glama
meomeo-dev

shell-as-mcp

by meomeo-dev

run_safe_command__execute

Execute a shell command securely in a validated working directory, with structured audit metadata and no shell eval.

Instructions

Execute a command safely with structured security and audit metadata. @remarks The command is executed without shell eval in a validated working directory. Runtime control behaviors are internal-only and not caller-configurable. On darwin/arm64, pre-execution auth prefers native Swift+WKWebView and automatically falls back to OSA. @param command Executable name to run (for example: ls, cat, grep). @param args_json JSON array string of positional arguments, for example ["-la", "./src"]. @param working_dir Absolute working directory where the command will run. @param __mcp_response_mode Optional response mode: content (default) or structuredContent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYes
args_jsonYes
working_dirYes
__mcp_response_modeNocontent
Behavior4/5

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

With no annotations provided, the description carries the full burden and does disclose useful behavioral traits: commands are executed without shell eval, in a validated working directory, runtime control behaviors are internal-only, and darwin/arm64 uses a specific auth fallback. However, it does not describe the return format, side effects, or error behavior, which would make it more complete.

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 and front-loaded, with a clear opening sentence followed by focused @remarks and well-structured @param explanations. Each sentence provides meaningful information without fluff, and the overall length is appropriate for the tool's four parameters.

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?

Given the absence of an output schema and annotations, the description does not explain return values, exit codes, or potential side effects, leaving a notable gap for a command execution tool. It covers usage and safety constraints well, but the lack of output structure means an agent may not know what to expect beyond the vague 'structured security and audit metadata.'

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

Parameters5/5

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

Schema description coverage is 0%, but every parameter is documented in the description with practical examples: 'command' is described as an executable name with examples, 'args_json' includes an example JSON array string, 'working_dir' is defined as an absolute path, and '__mcp_response_mode' is explained with its default. This fully compensates for the lack of schema descriptions.

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 opens with 'Execute a command safely with structured security and audit metadata,' a specific verb and resource that clearly states the tool's function. It also distinguishes itself from sibling tools by emphasizing safe execution without shell eval and structured audit metadata, setting it apart from simpler shell execution tools.

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 implies usage for safe command execution ('Execute a command safely') and highlights key constraints like no shell eval and validated working directory, but it does not explicitly state when to use this tool versus alternatives such as shell__run_script_echo or run_safe_command__pipeline. No exclusions or alternative recommendations are provided.

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/meomeo-dev/shell-as-mcp'

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