Skip to main content
Glama
guardvibe

guardvibe

by goklab

scan_directory

Scan all files in a directory for security vulnerabilities and get a security grade plus findings to identify risks in AI-generated code.

Instructions

Scan all files in a directory on disk for security vulnerabilities. Pass a directory path — reads files from filesystem. Returns security score (A-F) and findings. Results may be truncated for large projects — check fileRanking in JSON output for top files. Example: scan_directory({path: './src'})

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "scan_directory"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesDirectory path to scan (e.g. './src', '.')
formatNoOutput format: markdown (human) or json (machine-readable for agents)markdown
excludeNoAdditional directories to exclude
baselineNoPath to a previous scan JSON output file for baseline comparison (new/fixed/unchanged findings)
recursiveNoScan subdirectories

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.66.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It helpfully discloses that it reads files from the filesystem, returns a security score and findings, and may truncate results for large projects, but it does not clarify permissions, side effects, or whether any files are modified.

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?

The description is front-loaded with the core action, followed by concise usage, return, truncation, and example information. Every sentence serves a purpose and there is no unnecessary repetition.

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 tool with no output schema, the description gives a useful return overview: security score (A-F), findings, possible truncation, and where to check top files in JSON output. It is mostly complete, though a bit more detail on findings structure would help.

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 explains path, format, exclude, baseline, and recursive. The description adds an example path and notes fileRanking in JSON output, but does not add meaning to the other parameters beyond what the schema provides.

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 states a specific verb and resource: scanning all files in a directory for security vulnerabilities. It is clear what the tool does, though it does not explicitly name sibling alternatives such as scan_file or check_project to sharpen the distinction.

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 'Pass a directory path' and the example, but there are no explicit when-to-use versus when-not-to-use guidelines and no mention of alternatives like scan_file for single files or check_project for whole-project checks.

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