Skip to main content
Glama

Check Command & Path Safety

monaa_check_command_safety
Read-onlyIdempotent

Evaluates shell commands and file paths against MONAA security rules to block .env reads, destructive commands, symlink escapes, and self-protection tampering before execution.

Instructions

Evaluate a proposed shell command or file path against MONAA wire security rules (blocks .env reads, rm -rf, symlink escapes, and self-protection tampering in <50 us).

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": {
      "tool_name": "<tool_name>"
    },
    "name": "monaa_check_command_safety"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoOptional file or directory path to evaluate.
commandNoOptional shell command string to evaluate.
tool_nameYesTool name to check (e.g. bash, shell, read_file, write_file).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, and the description adds genuine value beyond them: the specific threat classes blocked and the <50 us latency, which tells an agent this is cheap enough to call frequently. The gap is the result shape — with no output schema, the description never says whether it returns a boolean verdict, a reason string, or both.

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?

A single sentence that front-loads the verb and resource, then packs the blocked-pattern examples and latency into a compact parenthetical. Nothing is redundant or buried.

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?

For a three-parameter safety-check tool with no output schema, the description covers the 'what' well but leaves the agent unsure how to interpret the response and how the optional command/path parameters interact. Those omissions matter for a gating tool an agent is expected to call before acting.

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

Parameters3/5

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

Schema coverage is 100%, with each of command, path, and tool_name documented in the schema itself, so the baseline of 3 applies. The description adds no meaning beyond the schema, notably leaving unaddressed what happens when both command and path are supplied despite only tool_name being required.

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 ('Evaluate') and resource ('a proposed shell command or file path') and names the rule set it checks against. The parenthetical examples (.env reads, rm -rf, symlink escapes, self-protection tampering) make the tool's scope concrete and clearly distinct from the sibling reporting/diagnostic 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 word 'proposed' implies this is a pre-execution gate, which is useful context, but the description never says explicitly when to call it or under what conditions (e.g. before every shell invocation). No alternatives or exclusions are mentioned, and none of the siblings appear to be substitutes, so guidance remains implied rather than stated.

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