Skip to main content
Glama
fs-mcp-server

fs-mcp-server

by qsrahman

Shell

shell
Destructive

Execute terminal commands to run tests, type checks, builds, git, and file listing or searching; use file tools for reading or editing files.

Instructions

Run a shell command and return its output; a failed command starts with its exit code, and stderr is labelled when there is any. Use it for tests, type checks, builds, git, and to list and search files (ls, find, grep). Do NOT use it to read, write or edit files (use the file tools), for interactive commands (stdin is closed), for commands that never exit (dev servers, watch modes), or for destructive ones (rm -rf, git reset --hard, force pushes) unless the user asked. Each call is a fresh process, so cd does not persist: use cwd (default: the server's working directory). The command and its child processes are killed after timeoutMs. Output past 20000 characters keeps its start and end; binary output becomes a short note.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "command": "<command>"
    },
    "name": "shell"
  }
}

Input Schema

NameRequiredDescriptionDefault
cwdNoDirectory to run the command in. Defaults to the server's working directory.
commandYesThe command to run, for example 'ls -lh' or 'git status'.
timeoutMsNoKill the command after this many milliseconds (at most 2147483647). Defaults to 30000; 0 disables the timeout.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.3
    • changedInput schema / properties / timeoutMs / description
      Previous value: -"Kill the command after this many milliseconds. Defaults to 30000; 0 disables the timeout."New value: +"Kill the command after this many milliseconds (at most 2147483647). Defaults to 30000; 0 disables the timeout."
    • changedInput schema / properties / timeoutMs / maximum
      Previous value: -9007199254740991New value: +2147483647
  2. First observedv0.3.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, but the description adds substantial non-obvious behavior: failed output is prefixed with the exit code, stderr is labelled, stdin is closed, each call is a fresh process so cd does not persist, and the whole process tree is killed after timeoutMs. It also discloses output shaping (20000-character cap keeping start and end, binary output collapsed to a note), which no annotation conveys.

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?

Front-loaded with purpose, then usage, then exclusions, then execution semantics, all in a tight paragraph with no filler. Length is justified by the risk profile of an arbitrary-command tool.

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

Completeness5/5

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

There is no output schema, and the description compensates by explaining the return format (exit-code prefix, stderr labelling, truncation, binary handling). Combined with the process-lifecycle and timeout details, nothing an agent needs to invoke this safely is missing.

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 the baseline is 3, but the description adds real meaning beyond the schema: it explains why cwd is needed (cd does not persist across calls) and ties timeoutMs to killing the command and its children. The only gap is that defaults and the 0-disables behavior are already in the schema, so some overlap exists.

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 ('Run a shell command and return its output') and immediately distinguishes it from the file tools by name. The agent can tell from the first sentence what this tool is and is not.

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?

Gives explicit positive cases (tests, type checks, builds, git, ls/find/grep) and explicit exclusions with the alternative named (file tools for read/write/edit, no interactive commands, no never-exiting processes, no destructive commands unless the user asked). This is a full when/when-not/alternative routing statement.

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