Skip to main content
Glama

preflight_scan_path

Scans a local file or directory recursively to detect secrets, Trojan-Source bidi characters, and prompt injection before treating the content as safe.

Instructions

Recursively scan a local file or directory for secrets, Trojan-Source bidi characters, and prompt injection.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "preflight_scan_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNo.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.3/5.0
Behavior3/5

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

With no annotations supplied, the description must carry the full behavioral burden. It does disclose two meaningful traits beyond the name: the traversal is recursive, and it detects three distinct threat classes including bidi/Trojan-Source characters. It never states that the scan is read-only and non-mutating, nor does it warn about cost or latency when recursing over a large directory tree.

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?

One sentence, front-loaded with the verb and traversal mode, followed by the resource and the detection targets. There is no filler and nothing that could be cut without losing information.

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?

The tool is simple (one optional parameter, no nested objects), which lowers the bar, but with no annotations and no output schema the description is the only place an agent can learn what a scan returns. It stops short of describing the result shape or how findings are reported, leaving a genuine gap for a security-scanning 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 0% for the single 'path' parameter, so the description has to compensate. It does clarify that the value may be either a file or a directory and that recursion applies, which is real meaning beyond the bare string type. However, the default of '.' and the expected path format (absolute vs relative, symlink handling) are left unstated.

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?

The description pairs a specific verb ('Recursively scan') with a concrete resource ('a local file or directory') and enumerates exactly what it detects: secrets, Trojan-Source bidi characters, and prompt injection. That is far more informative than a restated name, though it never names a sibling or states what distinguishes it from preflight_scan_text.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use, when-not-to-use, or alternative-tool guidance. The phrase 'local file or directory' hints at scope, but an agent gets no explicit rule for choosing this over preflight_scan_text or preflight_redact, and no note on when a scan is warranted versus unnecessary.

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