Skip to main content
Glama
guardvibe

guardvibe

by goklab

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

NameRequiredDescriptionDefault
pathNoRepository root to scan (default current directory).
formatNoOutput format: markdown (human) or json (guardvibe.slopscan.v1 for agents)markdown
onlineNoQuery the npm registry for existence/age/downloads. false = deterministic offline-only (phantom imports + typosquats).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv3.66.0
    • removedInput schema / additionalProperties
      Removed value: -false
  2. Addedv3.22.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full load and does so: it discloses the default-on network call, graceful degradation to offline, which checks run in each mode, and what each signal means (404 = definitive hallucination, new low-download = slopsquat pattern). The network/determinism tradeoff is the key behavioral trait an agent needs before calling.

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

Conciseness4/5

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

Front-loaded with the purpose, then structured as OFFLINE / ONLINE blocks with the opt-out instruction last — easy to scan. Slightly dense with marketing flavor ('supply-chain seam', parenthetical asides), but no sentence is redundant.

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 output schema, and the description says what is flagged but not the shape of findings or severity levels; the schema's guardvibe.slopscan.v1 hint partially covers this. For a 3-param, zero-required scan tool it is otherwise complete enough to invoke correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns an extra point by explaining the consequence of `online` (registry truth vs deterministic phantom+typosquat checks) and by noting the json output is versioned for agents. `path` and `format` remain schema-only.

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

Purpose5/5

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

A concrete verb ('Detect') plus a specific resource ('AI-hallucinated and slopsquatted packages in a repo'), with the phantom-import and typosquat/404/new-package signatures spelled out. The 'supply-chain seam commodity SCA misses' line separates it cleanly from the generic dependency scanners in the sibling list.

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

Usage Guidelines4/5

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

Gives clear operating context — run on AI-generated code at PR time, before `npm install` — and states the online:false alternative for air-gapped runs. It stops short of naming sibling tools (e.g. scan_dependencies, check_dependencies) that an agent might otherwise pick, so the routing guidance is implied rather than explicit.

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