Skip to main content
Glama

npm download counts (paid: 0.001 RLUSD / 0.001 USDC on Base / 0.001 RLUSD on Base via x402)

npm_downloads
Read-only

Paid: 0.001 RLUSD per call via x402 on XRPL mainnet (xrpl:0), or 0.001 USDC on Base (eip155:8453). Pay per call, solves one question: How many npm downloads did this package have in this period? npm's own published download count for one package and period (last-day, last-week, last-month, last-year, or a date range of up to 18 months) from npm's documented public API, with source and observed_at. Counts only; not unique users or popularity. Without payment this returns isError with the x402 PaymentRequired object (fresh invoiceId); retry with the signed payload in _meta["x402/payment"] or the payment_signature argument. Unpaid calls cost nothing.

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": "npm_downloads"
  }
}

Input Schema

NameRequiredDescriptionDefault
periodNolast-day|last-week|last-month|last-year|YYYY-MM-DD|YYYY-MM-DD:YYYY-MM-DD (default last-week)
packageYesnpm package name, e.g. express or @scope/name
payment_signatureNoOptional. Base64 x402 PAYMENT-SIGNATURE value (signed RLUSD or USDC PaymentPayload) for hosts that cannot set _meta["x402/payment"]. Omit on the first call to receive the payment requirements.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare read-only, open-world, non-destructive, non-idempotent, but the description adds substantial behavior the annotations cannot express: per-call pricing, the x402 payment handshake, the exact unpaid-call outcome (isError with a PaymentRequired object and fresh invoiceId), and the retry path via _meta["x402/payment"] or payment_signature. It also discloses that unpaid calls cost nothing, which is the key risk-reassurance an agent needs before calling.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single dense paragraph with no wasted sentences, but the pricing sentence leads and largely duplicates the title, pushing the actual purpose to the second sentence. For an agent scanning for selection, purpose should be front-loaded ahead of payment logistics.

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?

With no output schema, the description still tells the agent what comes back (count plus source and observed_at), what a failure looks like, how to recover from payment failure, and the data-range limit. That covers everything needed to invoke this tool correctly on the first or second attempt.

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 100%, so baseline is 3; the description adds real meaning by stating the 18-month maximum range, which the schema's period field does not mention, and by explaining the payment_signature parameter's role relative to the _meta channel. Package and period syntax themselves are already fully documented in the schema, so the gain is incremental rather than comprehensive.

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: npm's published download count for one package over a stated period, drawn from npm's documented public API. The phrasing "solves one question: How many npm downloads did this package have in this period?" pins the scope tightly and separates it from adjacent tools like mcp_registry_counts, which covers a different registry.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear when-to-use framing (one question, one package, one period) plus explicit exclusions: "Counts only; not unique users or popularity" and a hard cap of 18 months for date ranges. It does not name an alternative tool to use for popularity or unique-user questions, so it stops short of full routing guidance.

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