Skip to main content
Glama
tumf

mcp-shell-server

by tumf

shell_execute

Run whitelisted shell commands remotely via MCP with stdin input. Provide command array, optional directory, and timeout for controlled execution.

Instructions

Execute an allowed command as an argv array on the MCP server host. Allowed commands run with the server process's OS authority; the allowlist controls executable names, not what an allowed program does. Allowed commands: ls, wc, cat, pwd, grep Allowed patterns: Default timeout: 30s; maximum timeout: 300s; output cap: 1048576 bytes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stdinNoInput to be passed to the command via stdin
commandYesCommand and its arguments as array
timeoutNoMaximum execution time in seconds; clamped to server maximum
directoryNoOptional working directory. Omit to use the MCP server process current working directory; relative paths are resolved from that same server process CWD.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.1.0
    • changedInput schema / properties / directory / description
      Previous value: -"Absolute path to a working directory where the command will be executed"New value: +"Optional working directory. Omit to use the MCP server process current working directory; relative paths are resolved from that same server process CWD."
    • changedInput schema / properties / timeout / description
      Previous value: -"Maximum execution time in seconds"New value: +"Maximum execution time in seconds; clamped to server maximum"
    • changedInput schema / properties / timeout / minimum
      Previous value: -0New value: +1
    • changedInput schema / required
      Previous value: -[
      -  "command",
      -  "directory"
      -]New value: +[
      +  "command"
      +]
  2. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does so well: it discloses that commands run with the server process's OS authority, that the allowlist restricts names but not arguments/behavior, and states concrete default/max timeouts and an output cap. It omits error behavior and whether stderr/exit codes are surfaced, keeping it short of a 5.

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?

Dense, front-loaded, and every sentence carries operational weight. The stray empty 'Allowed patterns:' line is dead weight and looks like a rendering artifact, a minor flaw in an otherwise tight definition.

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?

Constraints (authority, allowlist semantics, timeouts, output cap, working directory) are well covered, but there is no output schema and the description never says what is returned — stdout, stderr, exit status — or how failures are reported. For a host-execution tool that gap matters to an agent interpreting results.

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, but the description adds real numbers the schema lacks: default timeout 30s and maximum 300s (schema only says 'clamped to server maximum') and an output cap of 1048576 bytes. It does not further clarify stdin or directory semantics, which the schema already handles.

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?

States a specific verb and resource ('Execute an allowed command as an argv array') plus the execution scope ('on the MCP server host'), and enumerates exactly which commands are permitted. An agent knows precisely what this tool does without opening the schema.

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

Usage Guidelines4/5

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

The allowlist (ls, wc, cat, pwd, grep) and the timeout/output limits give clear operational boundaries, and the note that the allowlist governs executable names rather than program behavior is a meaningful usage caveat. There are no sibling tools to route against, so no explicit when-not guidance is needed beyond the allowlist.

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

Deploy Server

Other Tools