Skip to main content
Glama
@guardbee/mcp-security-proxy

@guardbee/mcp-security-proxy

Official

tool_poisoning_scanner__scan_directory

Scan MCP server source directories recursively to detect tool-poisoning and confused-deputy patterns, helping identify unsafe tool definitions before deployment.

Instructions

Recursively scan a directory of MCP server source for tool-poisoning and confused-deputy patterns

Input 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
maxFilesNoMaximum number of files to scan (default: 5000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.5
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Addedv0.1.1

TDQS

B3.3/5.0
Behavior2/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. 'Recursively scan' does disclose traversal behavior, but nothing is said about read-only safety, what the results contain, or what happens with large trees despite a 5000-file default cap in the schema.

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 front-loaded sentence with zero filler; the verb, scope, and detection targets appear immediately.

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?

Four parameters with no annotations and no output schema mean the description must place more weight on return-shape and safety expectations. It covers what is scanned and why, but leaves result structure and operational cost unstated.

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 documents path, include, exclude, and maxFiles. The description adds no extra meaning about path resolution, filter precedence (include vs exclude), or scan-cost implications, so baseline 3 applies.

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 (recursively scan) and resource (a directory of MCP server source), plus the exact threat classes targeted (tool-poisoning, confused-deputy). The word 'directory' implicitly separates it from scan_file/scan_text, but it never names those siblings explicitly.

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?

Usage is implied by the 'directory of MCP server source' framing, so an agent can infer this is the directory-wide variant of the family. There is no explicit when-to-use, when-not-to-use, or named alternative (e.g. scan_file for a single server, list_patterns for coverage).

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