Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesnpm package name to check before installing, optionally with the version to install (e.g. "express" or "express@4.18.2")
thresholdNoScore threshold for allow decision (default: 60)
targetLicenseNoProject license for compatibility check (default: MIT)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.15.2
    • changedInput schema / properties / name / description
      Previous value: -"npm package name to check before installing"New value: +"npm package name to check before installing, optionally with the version to install (e.g. \"express\" or \"express@4.18.2\")"
  2. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does well: it discloses the checks performed (existence, typosquatting, security audit) and the allow/warn/block verdict semantics plus the required handling of negative verdicts. It omits any note on rate limits or repeat-call behavior, which keeps it short of a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the MANDATORY directive, then delivers the checks and the result-handling rule in two dense but fully earned sentences with zero filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No annotations and no output schema, so the description must carry behavioral weight, and it explains the return verdicts and required follow-up. It is largely complete for a pre-install gate, with only minor gaps around latency or failure modes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so both optional parameters and the required 'name' are already documented in the schema. The description implies the verdict relates to a score threshold and license but adds no syntax or format detail beyond the schema, matching the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verbs (verifies existence, checks typosquatting, runs audit) on a specific resource (npm package pre-install) and names the trigger commands (npm install/yarn add/pnpm add). The scope is unmistakable, though it does not explicitly name which sibling tools it complements among the large depguard family.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says to call it BEFORE any package install and covers the case where the agent decided to install on its own, not just user requests. It also states the downstream action on 'block'/'warn' results, leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.