Skip to main content
Glama
mcp-server-npm-registry

mcp-server-npm-registry

Get npm download statistics

get_download_stats
Read-onlyIdempotent

Retrieve npm package download counts for a chosen period (day, week, month, year, or custom date range). Returns the total, daily average, and an optional per-day breakdown for trend analysis.

Instructions

Get npm download counts for a package over a period (last-day, last-week, last-month, last-year, or a custom YYYY-MM-DD:YYYY-MM-DD range). Returns the total, the average per day and, optionally, a per-day breakdown (limited to ranges of 92 days or fewer). Data comes from the npm downloads API and lags about one day.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "package_name": "<package_name>"
    },
    "name": "get_download_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNo"last-day", "last-week", "last-month", "last-year" or a custom range "YYYY-MM-DD:YYYY-MM-DD". Default "last-week".last-week
package_nameYesnpm package name, e.g. "react" or "@types/node".
include_dailyNoInclude a per-day breakdown. Only allowed for periods of 92 days or fewer. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare read-only, idempotent, non-destructive, open-world behavior, so the safety profile is covered. The description adds genuinely new behavioral context beyond that: data originates from the npm downloads API and lags about one day, and the per-day breakdown is constrained to ranges of 92 days or fewer — both material to interpreting results.

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?

Two sentences, front-loaded with the verb and resource, then period vocabulary, return shape, and the freshness caveat. Efficient, with only minor overlap against the input schema's own descriptions of period and include_daily.

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?

With no output schema, the description correctly carries the burden of describing return values (total, per-day average, optional daily breakdown), the 92-day limit, data source, and one-day lag. Only minor gaps remain, such as behavior on an unknown package name or what error signals to expect.

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 coverage is 100% and every parameter already carries its own description including enum values, defaults, and the 92-day constraint, so the description largely restates the schema. It adds no syntax or validation detail beyond what the structured fields provide, making the baseline 3 correct.

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 ("Get npm download counts for a package") plus the exact time-period vocabulary, so an agent knows this returns download metrics rather than bundle size, package metadata, or vulnerabilities like its siblings. The scope is unambiguous without opening the 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?

The description implies the use case (fetching download statistics for a known package) and gives useful framing about the data source, but it never states when to pick this over get_bundle_size or get_package_info, nor any prerequisites or exclusions. Usage is inferred from the name and resource rather than taught.

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