Skip to main content
Glama

Package Safety Check API - npm and PyPI before you install

package_safety_check
Read-onlyIdempotent

Call before npm install or pip install: one verdict (ok / caution / avoid) with plain reasons and a 0-100 risk score. Checks that the package exists (catches hallucinated names), typosquats of popular packages, brand-new releases (72 h supply-chain cooldown), install scripts, deprecated or yanked versions, licence, repository, weekly downloads and known vulnerabilities of that exact version (OSV) with the fixed version. Up to 25 packages per call, live registry data, ~0.3-1.5 s. Built for AI coding agents and CI. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.003/call via x402 at https://radarbg.com/x402/package-safety-check.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "packages": [
        "npm:lodash@4.17.4",
        "npm:express",
        "pypi:reqeusts"
      ]
    },
    "name": "package_safety_check"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoPackage name, e.g. express, @types/node, requests
versionNoExact version or npm dist-tag (default: latest)
packagesNoInstead of name: up to 25 items like 'npm:lodash@4.17.4', 'pypi:requests==2.19.0', 'express'
ecosystemNonpm or pypi (default npm)npm

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only declare readOnly/openWorld/idempotent; the description goes well past that with latency (~0.3-1.5 s), freshness (live registry data), quota and auth mechanics (free 5 calls/day per IP, X-API-Key for paid, x402 per-call payment), and the exact shape of the answer. For a network-bound, rate-limited external API, those are precisely the operational facts 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?

The key action and trigger are front-loaded in the first clause, and the dense enumeration of checks is compact rather than padded. The closing pricing/auth sentence is long and link-heavy, but it carries genuinely actionable quota and access information for an agent.

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

Completeness5/5

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

There is no output schema, so the description must describe return values, and it does: a single verdict, plain reasons, a 0-100 risk score, and the fixed version for known vulnerabilities. Combined with limits, latency, auth and the hallucinated-name check, an agent has everything needed to call it correctly and interpret the result.

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%, and the schema already documents name/version/packages/ecosystem, including the 'instead of name' alternative and the 25-item maximum. The description only restates the 25-package limit and adds no format or precedence detail (e.g. what happens if both name and packages are supplied) beyond what the schema says, so it sits at the baseline.

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?

States a specific verb and resource: it checks an npm/PyPI package before install and returns a single verdict (ok / caution / avoid) with a 0-100 risk score and reasons. The enumerated checks (existence, typosquats, 72h cooldown, install scripts, yanked versions, licence, downloads, OSV vulns with fixed version) make the scope unmistakable and clearly separable from every sibling tool listed.

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?

'Call before `npm install` or `pip install`' gives an explicit trigger condition that an agent can act on directly, and the title reinforces the same timing. It also states the batch ceiling (up to 25 packages per call), so the agent knows when to batch rather than make repeated calls; no sibling tool overlaps this domain, so no alternative needs to be named.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources