Skip to main content
Glama

check_command_safety

Check a shell command before executing it and receive a risk verdict with plain-English warnings for destructive patterns such as rm -rf /, curl | sudo bash, and disk-wiping commands.

Instructions

Safety-check a shell command BEFORE executing it. Returns a risk verdict (danger / caution / none) and plain-English warnings for destructive patterns: rm -rf /, curl | sudo bash, dd/mkfs/shred/wipefs to a disk device, chmod -R 777 /, git push --force, truncating /etc/passwd, fork bombs, kill -9 -1, find / -delete, and more. Ideal as a guard an AI agent calls before running shell commands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe shell command line to safety-check.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses the return type (risk verdict: danger/caution/none) and the kind of output (plain-English warnings), with concrete destructive-pattern examples. It could be more explicit that the tool does not execute the command, but 'BEFORE executing it' strongly implies static safety analysis.

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 front-loaded with the core purpose and usage. The second sentence enumerates destructive patterns, which is informative but slightly verbose; it could be trimmed to 'destructive patterns such as rm -rf /, curl | sudo bash, and more' without losing value.

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?

With one simple parameter, no output schema, and no annotations, the description clearly conveys inputs and outputs: a command string in, a verdict plus warnings out. It covers the essential scope well. It could add an explicit 'does not execute the command' statement, but the overall description is sufficient for an agent to call it correctly.

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 description coverage is 100%, so the schema already fully documents the single 'command' parameter. The description adds illustrative examples of what kinds of commands can be checked, but no additional technical detail beyond the schema.

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 states a specific verb ('Safety-check'), a clear resource ('a shell command'), and the timing ('BEFORE executing it'). It also distinguishes itself from the sibling explain_command by focusing on risk verdicts and destructive patterns rather than explanation.

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 explicitly says this is ideal as a guard an AI agent calls before running shell commands. It does not explicitly exclude alternatives like explain_command, but the use case is clearly scoped to pre-execution safety checks.

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