Skip to main content
Glama

Get Downloads

get_downloads
Read-onlyIdempotent

Fetch npm download counts for a package over a named period (last-day, last-week, last-month, last-year) or a custom date range like "2024-01-01:2024-06-30". Returns total downloads, start date, and end date.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesPackage name
periodNoDownload period: last-day, last-week (default), last-month, or a date range like 2024-01-01:2024-06-30

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesPeriod end date
startYesPeriod start date
periodYesThe requested download period
packageYesPackage name
downloadsYesTotal downloads in the period

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "downloads": {
      +      "description": "Total downloads in the period",
      +      "type": "number"
      +    },
      +    "end": {
      +      "description": "Period end date",
      +      "type": "string"
      +    },
      +    "package": {
      +      "description": "Package name",
      +      "type": "string"
      +    },
      +    "period": {
      +      "description": "The requested download period",
      +      "type": "string"
      +    },
      +    "start": {
      +      "description": "Period start date",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "package",
      +    "downloads",
      +    "period",
      +    "start",
      +    "end"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "name": "react"
      +  },
      +  {
      +    "name": "axios",
      +    "period": "last-month"
      +  }
      +]
  3. First observed

TDQS

A4/5.0
Behavior4/5

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

With annotations already declaring readOnlyHint=true and destructiveHint=false, the safety profile is known. The description adds behavioral context by specifying the return values (total downloads, start date, end date) and accepted period formats, though it also introduces 'last-year' which is not present in the schema, creating a minor ambiguity.

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, front-loaded with the action and object. Every word earns its place, includes examples, and is easy to scan.

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?

Given the simple read-only nature and presence of an output schema, the description is mostly complete. It covers return values and period formats. However, the 'last-year' discrepancy with the schema and lack of mention of the default period (which the schema does state) slightly reduces completeness.

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 description coverage is 100%, so the baseline is 3. The description largely repeats the schema's period list and adds 'last-year' which is not in the schema, potentially confusing. No significant new semantic meaning beyond what the schema already provides.

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 uses a specific verb ('Fetch') and resource ('npm download counts for a package') and clarifies scope with period types. This clearly distinguishes it from siblings like get_package or get_version_info which deal with other package data.

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 usage when you need npm download counts, but it does not explicitly state when to use this versus alternatives, nor does it mention any exclusions or alternative tools. The purpose is clear enough that an agent can infer, but explicit guidance is absent.

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.