Skip to main content
Glama

Autonomous Agent Pre-Execution Command & Prompt Injection Gate

verify_agent_command_safety
Read-onlyIdempotent

Blocks prompt injection, destructive shell commands, and private-key exfiltration by evaluating untrusted agent prompts, bash commands, and tool arguments before autonomous execution.

Instructions

Evaluates untrusted agent prompts, bash commands, and tool arguments to block prompt injection, destructive shell commands, and private-key exfiltration. Use when screening a general shell command or user prompt before autonomous agent execution; for statically validating SQL database queries at the AST level, use validate_sql_query_ast instead. Stateless read-only edge call (max 32 KB, 60 RPM): accepts 'payload' ('action_type' defaults to 'bash_command'), supports '?demo=true' or L402 (20 sats), and returns HTTP 400 if invalid.

Input Schema

NameRequiredDescriptionDefault
payloadYesRaw command string, script snippet, or untrusted prompt to inspect for safety violations.
action_typeNoExecution context of the payload; defaults to 'bash_command' when omitted.

Output Schema

NameRequiredDescriptionDefault
safeYesTrue when zero injection, exfiltration, or destructive patterns are found.
verdictYesEnforcement decision ('ALLOW', 'BLOCK', or 'QUARANTINE').
risk_scoreYesNormalized threat probability from 0.0 (benign) to 1.0 (critical).
threats_detectedYesList of specific threat categories triggered by the payload.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.3

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations (which already declare readOnly, idempotent, non-destructive, closed-world): it discloses statelessness, a 32 KB payload ceiling, a 60 RPM rate limit, the demo/L402 pricing path, and the HTTP 400 failure mode for invalid input. These are exactly the operational constraints an agent cannot infer from structured fields.

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-loads the action and the sibling differentiation, then compresses pricing/limits/errors into one trailing sentence — efficient overall. The final clause is somewhat dense with operational trivia (L402, 20 sats, 20 s timeout) that slightly crowds the core guidance, but nothing is wasted.

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?

With an output schema present, return-value detail is correctly omitted, and the description still covers the constraints that block a correct call: size cap, rate limit, auth/payment options, and error behavior. Nothing an agent needs before invoking is missing.

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% and already documents both fields, including the 'bash_command' default. The description restates the default and names the payload field but adds no new syntax, size-per-field, or format guidance beyond the schema, so the baseline of 3 applies.

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 (evaluates/blocks) against specific resources (untrusted prompts, bash commands, tool arguments) and names the exact threat classes it addresses (prompt injection, destructive shell commands, key exfiltration). It also explicitly contrasts itself with validate_sql_query_ast, so an agent can route correctly 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?

Gives a positive trigger ('use when screening a general shell command or user prompt before autonomous agent execution') and a negative one with the named alternative ('for statically validating SQL database queries at the AST level, use validate_sql_query_ast instead'). Both the when-and the when-not are explicit.

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