ai_guard_check_package
Checks npm packages before install or npx to flag nonexistent names, look-alikes, fresh releases, install scripts, and other risks, returning a block verdict when a package should not be used.
Instructions
Check npm packages before installing or running them (npm install, npx). Reports names that do not exist (often invented by assistants), look-alikes of popular packages, new or rarely downloaded packages, install scripts, deprecations, npm security placeholders and releases published in the last day. verdict "block" means do not install; use the package named in similarTo or check the name. A fresh-release finding means ask the user or install the previous version. Contacts registry.npmjs.org and api.npmjs.org; packages from a private registry are skipped. Installs nothing.
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": {
"packages": "<packages>"
},
"name": "ai_guard_check_package"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| packages | Yes | Package names, optionally with a version or dist-tag: "lodash", "react@18.3.1", "@types/node" | |
| freshHours | No | Versions published fewer hours ago are fresh releases (default 24; 0 turns the check off) | |
| minAgeDays | No | Packages first published fewer days ago count as new (default 30) | |
| minWeeklyDownloads | No | Fewer weekly downloads count as rarely used (default 100) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| errors | Yes | ||
| status | Yes | ||
| success | Yes | ||
| packages | Yes | ||
| safeToInstall | Yes |