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
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Directory path to scan (e.g. './src', '.') | |
| format | No | Output format: markdown (human) or json (machine-readable for agents) | markdown |
| exclude | No | Additional directories to exclude | |
| baseline | No | Path to a previous scan JSON output file for baseline comparison (new/fixed/unchanged findings) | |
| recursive | No | Scan subdirectories |