Skip to main content
Glama

UK Data: CVEs and package popularity

npm_stats

Read-onlyIdempotent

Get download statistics for a JavaScript package on the npm registry. Returns the total download count for the last week to gauge popularity and usage trends. (cost: 1 credit)

Input Schema

NameRequiredDescriptionDefault
packageNostring, required, npm package name, e.g. "react"

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so safety is covered structurally. The description adds the metric semantics (total downloads for the last week) and a cost signal ('1 credit'), which is genuine added value, but it does not say what happens on an unknown package name or whether the figure is a point-in-time snapshot versus cached data. Net effect is modest beyond the annotations.

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?

Two sentences plus a short cost tag, with the verb and resource front-loaded. Nothing is redundant and every sentence contributes either scope or return-value information.

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?

For a single-parameter read tool with no output schema, the description is nearly sufficient: it names the registry, the metric, and the time window of the result. The only shortfall is that 'statistics' in the name implies a richer payload while the text promises only a weekly total, a mild ambiguity an agent may notice.

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?

With one parameter at 100% schema description coverage (including the 'react' example), the schema already carries the semantics. The description reinforces the scope by stating the input must be an npm package on that registry, which is a small but real clarification of accepted values beyond the generic 'npm package name' field text.

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 names a specific verb ('Get download statistics') and a precisely scoped resource ('a JavaScript package on the npm registry'). That registry qualifier implicitly separates it from the sibling pypi_stats and crate_stats tools, so the agent can pick the right one without opening a schema.

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

Usage Guidelines3/5

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

Usage is only implied via the stated goal ('gauge popularity and usage trends'). There is no explicit when-to-use guidance, no exclusion of alternatives such as package_info, and no statement about what to do if the package does not exist. Adequate but with a clear routing gap.

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