Skip to main content
Glama
tumf

mcp-shell-server

by tumf

shell_execute

Run whitelisted shell commands on the server host with stdin, timeout, and working directory options. Use to inspect files, list directories, or count lines without exposing full shell access.

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: cat, pwd, wc, ls, 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.3/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 of behavioral disclosure, and it does so well: it states OS authority, allowlist semantics, default and maximum timeout, and output cap. It does not mention return format, stderr behavior, or what happens on non-zero exit, which leaves a minor transparency gap for a command execution tool.

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 concise and front-loads the core purpose and safety caveat before listing constraints. The empty 'Allowed patterns:' section is a minor structural blemish, but every other sentence earns its place and the overall length is appropriate.

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 lack of annotations and output schema, the description covers the most important operational facts: allowed commands, execution authority, timeout bounds, and output cap. It is sufficiently complete for an agent to invoke the tool correctly, though explicitly documenting the return shape or error behavior would make it fully complete.

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 description coverage is 100%, so the baseline is 3. The description adds value beyond the schema by enumerating the valid command names, clarifying that commands are passed as an argv array, and providing timeout defaults and output limits that are not in the parameter 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 clearly states the verb 'execute', the resource ('an allowed command as an argv array'), and the execution context ('on the MCP server host'). It also distinguishes the tool's scope by immediately defining the allowlist, so the agent knows exactly what this tool does and which commands it covers.

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 description provides explicit allowed commands and clarifies that the allowlist restricts executable names, not the behavior of allowed programs. With no sibling tools, there is no alternative to compare against, but the allowlist effectively tells the agent when this tool is usable and when it is not.

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