scan_hallucinated_packages
Detect AI-hallucinated and slopsquatted packages in a repo before npm install by flagging phantom imports, typosquats, 404 packages, and suspicious new low-download registrations.
Instructions
Detect AI-hallucinated and slopsquatted packages in a repo — the supply-chain seam commodity SCA misses. OFFLINE (deterministic): flags phantom imports (a package imported in source but absent from every package.json — a classic LLM hallucination tell) and typosquats of popular packages. ONLINE (opt-in, default on; gracefully degrades offline): adds npm-registry truth — packages that return 404 (definitive hallucination) and brand-new low-download packages (slopsquat-registration pattern). Run on AI-generated code at PR time, before npm install. Pass online:false for a fully deterministic, air-gapped scan.
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": "scan_hallucinated_packages"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Repository root to scan (default current directory) | . |
| format | No | Output format: markdown (human) or json (guardvibe.slopscan.v1 for agents) | markdown |
| online | No | Query the npm registry for existence/age/downloads. false = deterministic offline-only (phantom imports + typosquats). |