Skip to main content
Glama

Get Npm Trends

get_npm_trends
Read-onlyIdempotent

Fetch daily download counts for an npm package — up to 100 days, with total, latest day and average over days that have data; days without collection are null with a note. Read-only aggregation of daily-collected observatory data; no side effects. Days inside the npm reporting delay are partial (shown, excluded from latest and average), never fake zeros. Use when the user asks how an npm package is growing; for side-by-side comparison use get_package_comparison.

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": "<package>"
    },
    "name": "get_npm_trends"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNo
packageYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the read-only/idempotent annotations: it discloses that days without collection are null with a note, that days inside the npm reporting delay are partial and excluded from latest/average, and that missing data is never rendered as fake zeros. That is exactly the kind of data-integrity behavior an agent could not infer from the schema.

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-loads the core action and keeps everything in three dense sentences. There is mild redundancy in restating read-only/no-side-effects, which the annotations already declare, but no sentence is padded or off-topic.

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?

An output schema exists, yet the description still summarizes the returned aggregates and the null/partial-day semantics, which is exactly the nuance those fields need. For a two-parameter, read-only analytic tool, nothing an agent needs to call it correctly is missing.

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 0%, but the description compensates for `days` by revealing the 100-day maximum (not encoded in the schema) and how sparse days affect the computed latest/average. The `package` parameter stays generic ('an npm package') — it never clarifies scoped names like @scope/pkg — which is a real residual gap at zero schema coverage.

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 (fetch daily download counts for an npm package) plus concrete scope (up to 100 days) and what is aggregated (total, latest day, average). It is clearly distinguishable from `get_package_comparison` and implicitly from `get_pypi_trends` by naming npm.

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?

Explicitly states the trigger ('when the user asks how an npm package is growing') and routes to the alternative for a different need ('for side-by-side comparison use `get_package_comparison`'). Both when-to-use and when-to-use-something-else are present.

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