Skip to main content
Glama
GuardBee

@guardbee/mcp-security-proxy

Official

prompt_injection_scanner__scan_directory

Recursively scans a directory for indirect prompt injection payloads in files like RAG knowledge bases or scraped pages, skipping node_modules, .git, dist, and binary files.

Instructions

Recursively scan a directory — e.g. a RAG knowledge base or a corpus of scraped pages — for indirect prompt injection payloads. Automatically skips node_modules, .git, dist, and binary files.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to the directory to scan
excludeNoSkip files/dirs whose path contains one of these strings
includeNoOnly scan files whose path contains one of these strings (e.g. [".md", "knowledge-base/"])
maxFilesNoMaximum number of files to scan (default: 5000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.1.1

TDQS

A3.6/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses automated skip behavior (node_modules, .git, dist, binary files), which is genuine context beyond the schema. But it says nothing about output format, permissions, rate limits, or the default 5000-file cap behavioral implication.

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?

Two sentences, zero waste, with the core action front-loaded before the secondary skip behavior. Every clause earns its place.

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?

For a directory scanner with no annotations and no output schema, the description covers purpose and one behavioral quirk adequately. It is nearly complete, though an agent might still want to know the response shape or whether findings include file paths and line numbers. Not a serious gap for a scan tool.

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 all four parameters (path, exclude, include, maxFiles) are already documented in the schema. The description adds no syntax, format, or interaction details beyond what the schema provides, so the baseline of 3 applies. The auto-skip note is adjacent to but not a clarification of the exclude parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (scan), resource (directory), scope (recursively), and threat target (indirect prompt injection payloads). The purpose is clear and the 'directory' scope implicitly distinguishes it from scan_file/scan_text siblings, but it never names them explicitly, so differentiation relies on the reader inferring from the tool name.

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 examples 'a RAG knowledge base or a corpus of scraped pages' imply appropriate contexts for a bulk directory scan, which is better than nothing. However, there is no explicit when-to-use-vs-alternatives guidance (e.g. 'use this instead of scan_file when you have many files') and no exclusions or prerequisites.

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