Skip to main content
Glama
Majrooo

majrooo-mcp-devkit

by Majrooo

run_safe_command

Destructive

Execute shell commands safely within the project root, blocking dangerous operations automatically. Use for tests, builds, and typechecks when unsure about command safety.

Instructions

Executes a safe command inside the project folder. This is the default command execution tool — use it whenever you are not sure whether a command is dangerous. Commands outside the project or that look dangerous are rejected automatically. If the tool returns isError:true with a rejection message (dangerous or directory_escape), DO NOT try to bypass it by rewriting the command or immediately switching to run_destructive_command without asking the user first. For dangerous operations use run_destructive_command with confirm:true. NOTE: 60s limit (optionally extend via timeoutMs) — not suitable for dev servers / watch mode. Run test suites (jest/npm test), typecheck and builds through this tool or run_command_grep, NOT through the built-in terminal. If the task targets a project other than the primary one (MCP_PROJECT_ROOT), always pass the "cwd" parameter. Get the list of allowed roots via the "list_allowed_roots" tool.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNoThe directory in which the command will be run (must be inside MCP_PROJECT_ROOT / MCP_EXTRA_ROOTS). Default: the primary project (MCP_PROJECT_ROOT).
commandYesThe command to execute (runs in the directory given by the cwd parameter)
maxLinesNoMaximum number of output lines (default: 200)
timeoutMsNoTimeout in milliseconds (1,000 – 600,000, default 60,000). You can extend it for longer tests/builds, e.g. 180,000 for jest.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses automatic rejection of out-of-project or dangerous commands, the isError:true rejection messages (dangerous / directory_escape), an explicit anti-bypass policy, the 60s default timeout with timeoutMs extension, and the cwd requirement for non-primary projects. The destructiveHint:true annotation sits in slight tension with the 'safe' framing, but the description's boundary ('rejects dangerous') and escalation path resolve it rather than contradict it.

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?

Front-loaded with purpose and the safety boundary, and every sentence carries operational information. It is dense and heavy with emphatic capitalization (DO NOT, NOTE), which slightly hurts readability but not correctness.

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?

For a command-execution tool with no output schema, it covers what an agent needs: rejection semantics, escalation path, timeout limits, working-directory rules, and how to discover allowed roots via list_allowed_roots. Nothing material is left to inference.

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: when to pass cwd (tasks targeting a project other than MCP_PROJECT_ROOT) and a concrete timeoutMs example (180,000 for jest). Only maxLines is left entirely to the schema, so it does not reach a 5.

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 ('Executes a safe command inside the project folder') and immediately positions itself against the sibling run_destructive_command. An agent can tell the two apart without opening either schema.

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?

Explicitly gives the default-use rule ('use it whenever you are not sure whether a command is dangerous'), names the alternative for dangerous operations (run_destructive_command with confirm:true), and states a when-not (not suitable for dev servers / watch mode), plus routing guidance for test suites and builds.

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