Get npm downloads for several packages
npm_packages_downloads_batch_getGet npm downloads for up to 128 package names in one call, one result per requested name. Requires names. Returns a list. Costs credits; see meta.creditsCharged.
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": {
"names": "<names>",
"context": "<context>",
"llm_model": "<llm_model>"
},
"name": "npm_packages_downloads_batch_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`. | |
| names | Yes | Required. Comma-separated package names, 1 to 128, with at most 20 scoped names because each one is looked up separately. | |
| 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. |