Skip to main content
Glama

npm package bundle size from Bundlephobia's public size

dev_bundlephobia
Read-only

npm package bundle size from Bundlephobia's public size API: minified and gzipped size in bytes, version, number of dependencies, repository and description. Give a package name, optionally with @version (e.g. react@18.3.1). Sizes are as Bundlephobia computes them. Related tools on this server, for a different need: dev_covers when you need sportsbook odds from Covers.com odds screens: every listed; dev_fanduel when you need FanDuel Sportsbook game lines for NFL, NBA, MLB, NHL, WNBA. Price: $0.002 in USDC per successful call, paid with x402 (Base, Solana or Arc); failed calls are not charged.

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

Input Schema

NameRequiredDescriptionDefault
packageYesnpm package name, optionally with @version, e.g. react or lodash@4.17.21

Output Schema

NameRequiredDescriptionDefault
sourceNo
packageNo
versionNo
checkedAtNo
gzipBytesNo
repositoryNo
descriptionNo
minifiedBytesNo
hasSideEffectsNo
dependencyCountNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so safety is covered. The description still adds real behavioral context beyond them: the caveat that 'sizes are as Bundlephobia computes them' (i.e. third-party methodology, not a local build) and the billing model — $0.002 USDC per successful call via x402 across Base/Solana/Arc, with failed calls not charged. Cost and payment requirements are useful pre-invocation facts.

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?

The core purpose and return fields are front-loaded and clear, but a full sentence is spent advertising dev_covers and dev_fanduel — tools unrelated to bundle sizing — and the pricing paragraph is lengthy relative to the single-parameter operation. Roughly a third of the text does not help select or invoke this tool.

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?

With an output schema present, the description needn't explain return values, and it covers input format, a methodological caveat, and payment terms. The main gap is that the promoted sibling tools don't include any real counterpart for this task, so an agent comparing against similar dev-data tools gets no routing help.

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?

Only one parameter and schema description coverage is 100%, so the schema already documents the package name and version format. The description restates the same example (react@18.3.1) without adding syntax, scoping, or edge-case meaning such as handling of scoped packages or unversioned resolution.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('npm package bundle size from Bundlephobia's public size API') and enumerates the returned fields: minified/gzipped bytes, version, dependency count, repository, description. The sibling differentiation offered is against dev_covers and dev_fanduel, which serve sportsbook odds and are not genuinely close alternatives, so it doesn't help an agent distinguish this from adjacent dev-metrics tools like dev_codecov_stats.

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?

Usage is only implied: it explains the input format ('give a package name, optionally with @version') and that the two listed related tools serve 'a different need.' It gives no explicit when-to-use or when-not-to-use for bundle-size lookups, e.g. versus a registry metadata or coverage tool.

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