Skip to main content
Glama
Shrike-Security

Shrike Security MCP Server

scan_command

Read-onlyIdempotent

Scan shell commands for injection, unsafe operations, and threats before execution. Use this tool to verify safety before running any CLI command generated by an LLM or from user input.

Instructions

Protective check on shell commands — catches injection or unsafe operations before execution, so you don't run something you would not have run if you'd known.

Call this BEFORE executing any CLI command generated by an LLM, constructed from user input, or involving system operations.

DECISION LOGIC:

  • If blocked=true: do NOT execute the command. Return the user_message and log audit.scan_id for security review.

  • If blocked=false: the command is safe to execute.

  • If action=require_approval: pause execution, present approval_context to the user, then call check_approval with the approval_id.

Checks for:

  • Data exfiltration attempts

  • Destructive operations

  • Remote code execution

  • Privilege escalation

  • Secret exposure

  • Obfuscated commands

  • Pipe chain analysis (cross-command threat detection)

Common safe commands (ls, git, npm, docker build, go test, etc.) pass through without triggering.

Enterprise context: Critical for any agent with shell/subprocess access. Prevents both malicious and accidental damage from LLM-generated commands.

ERROR HANDLING: If this tool returns an error or is unavailable, default to BLOCKING the command. Do NOT execute unscanned commands.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
commandYesThe CLI command to scan before execution
shellNoShell interpreter (default: bash)
working_directoryNoWorking directory where command will execute
execution_contextNoDeployment environment for context-aware analysis
piped_fromNoPrevious command output being piped into this command
session_idNoSession identifier for multi-turn correlation.
agent_idNoYour agent identifier for activity tracking.
parent_agent_idNoParent agent ID if you are a sub-agent (delegation chain tracking).
task_chainNoDelegation path from root agent (e.g., "main→research→fetch").
Behavior5/5

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

Annotations (readOnlyHint, etc.) are consistent and the description adds specific threat categories and enterprise context, going beyond the annotations.

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?

Well-organized with headings and front-loaded purpose, though somewhat lengthy; all content is relevant for a security-critical 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?

Covers all necessary aspects: decision logic, error handling, common safe commands, and enterprise context; no gaps given the 9 parameters and no output schema.

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?

Input schema has 100% description coverage for all 9 parameters; the tool description does not add significant new parameter-level 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 precisely states it is a protective scan for shell commands, clearly distinguishing it from sibling scan tools like scan_sql_query or scan_file_write.

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?

Explicit instruction to call before executing any CLI command, with decision logic for blocked, require_approval, and error cases, and mention of common safe commands.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Shrike-Security/shrike-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server