Get npm package downloads
npm_package_downloads_getRetrieve npm package download counts for a selected period, custom date range, or the entire registry, with totals or daily granularity.
Instructions
Get npm downloads for a package over a period or a day range, or the whole registry's total. Optional inputs: name, period, from, to and granularity.
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": {
"context": "<context>",
"llm_model": "<llm_model>"
},
"name": "npm_package_downloads_get"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Last day of the range, `YYYY-MM-DD`. Must be on or after `from`; a `to` before 2015-01-10 is refused. A range spans up to 18 months; a longer range keeps its newest 18 months and sets `clamped`. | |
| from | No | First day of the range, `YYYY-MM-DD`. Download data starts on 2015-01-10; a `from` after today is refused. A range spans up to 18 months; a longer range keeps its newest 18 months and sets `clamped`. | |
| name | No | Package name. Omit it for the whole registry's download total. | |
| period | No | Window: `last-day`, `last-week`, `last-month` or `last-year`. Default: `last-week` unless `from`/`to` are given. | |
| context | Yes | Describe the user's underlying goal in one sentence, not the tool you are calling. | |
| llm_model | Yes | The exact model identifier you (the assistant) are running as, taken from your system prompt or environment (for example "claude-opus-4-8" or "gpt-5.2"). Used for analytics only. If you do not know your model identifier with certainty, pass "unknown" and do not guess. | |
| granularity | No | `total` for one number, `daily` for one row per day. Default: `total`. | |
| conversation_id | No | Echo the conversation_id from the server's previous response. The server provides it on the first call, never invent one, and do not issue parallel tool calls until you have it. |