Skip to main content
Glama
mgcrea

@mgcrea/mcp-npm

by mgcrea

npm: Audit Dependencies

npm_audit_dependencies
Read-only

Check exact package versions against npm's security advisories and return only packages with known vulnerabilities. No npm token needed.

Instructions

Check a set of package versions against npm's security advisories — the same data npm audit uses, queried directly. Takes a flat map of package name to the versions you have installed, and returns only the packages with advisories against them. Needs no npm token, so it works on an otherwise unconfigured server. The references field is stripped from each advisory: it is about 1.5 KB of markdown links apiece, and url already points at the write-up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dependenciesYesInstalled versions per package, e.g. {"lodash": ["4.17.20"], "minimist": ["1.2.0", "0.0.8"]}. Exact versions, not ranges — an advisory match is computed against the version you actually have.
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses meaningful behavior: it returns only packages with advisories, it strips the `references` field for size, and the `url` field remains as the pointer to the write-up. It also explicitly notes no token is needed, which is valuable operational context.

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?

The description is concise and well-structured: it opens with the core function, then explains input format, operational prerequisite, and a notable output transformation. Every sentence contributes useful information without redundancy.

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?

For a one-parameter, read-only tool with no output schema, the description adequately covers what input is expected, what the output will contain (only affected packages), and one important field behavior that would otherwise be a surprise. An agent can confidently invoke this tool without needing more context.

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?

The schema has 100% coverage and already explains the format, gives an example, and warns that exact versions (not ranges) are required. The description's phrase 'flat map of package name to the versions you have installed' simply repeats the schema's meaning without adding new semantics, so the baseline 3 is appropriate.

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?

The description states a specific verb ('Check') and resource ('package versions against npm's security advisories'), and ties it to the familiar `npm audit` command. The topic is clearly distinct from the sibling `npm_auth_status`, which is about authentication state, not dependency auditing.

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?

It gives clear context: this is a direct query of npm's advisory data, and it requires no npm token, so it works on an unconfigured server. It doesn't explicitly mention the sibling as an alternative, but the sibling's purpose is obviously different, so an agent can infer when to use this tool.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mgcrea/mcp-npm'

If you have feedback or need assistance with the MCP directory API, please join our Discord server