scan_tree
Scans project files for exposed secrets, returning read-only, redacted findings and respecting .gitignore in Git repositories.
Instructions
Scan the files of a project directory for secrets. Read-only; values are redacted.
Detects AWS, GitHub, GitLab, Slack, Stripe, Google, OpenAI, Anthropic, npm, PyPI and SendGrid keys, JWTs,
PEM private key blocks, passwords inside URLs, and generic high-entropy values assigned to names like
password/secret/token/api_key. In a git repository it scans exactly what git add . would pick up
(tracked files plus untracked files that are not ignored), so .gitignore is respected. It skips binaries,
files over 1 MB, lockfiles and vendored directories (node_modules, vendor, .venv, ...). It does not follow symlinks.
Each finding shows: severity, id (f-), rule, file:line, and the value as 'first 4 chars + length' (short secrets show no characters). Findings listed in /.secretscan-ignore are suppressed.
Args: path: project directory (absolute or relative to the server's working directory). max_findings: cap on findings listed, highest severity first.
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_tree"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| max_findings | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |