depguard_guard
Verify npm packages before npm/yarn/pnpm install to block hallucinated names, typosquatting, and security risks, returning allow, warn, or block.
Instructions
MANDATORY: call this BEFORE running npm install, yarn add, or pnpm add — whether the user asked for the package or you decided to install it yourself. Verifies the package exists (blocks hallucinated names), checks for typosquatting, runs security audit, and returns allow/warn/block. If the result is "block" or "warn", do NOT install the package without informing the user.
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": {
"name": "<name>"
},
"name": "depguard_guard"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | npm package name to check before installing, optionally with the version to install (e.g. "express" or "express@4.18.2") | |
| threshold | No | Score threshold for allow decision (default: 60) | |
| targetLicense | No | Project license for compatibility check (default: MIT) |