Skip to main content
Glama
mcp-server-npm-registry

mcp-server-npm-registry

Get npm bundle size

get_bundle_size
Read-onlyIdempotent

Measure an npm package version's browser bundle size via Bundlephobia, including minified and gzipped bytes, dependency count, tree-shaking indicators, and largest dependencies.

Instructions

Get the browser bundle size of an npm package version via Bundlephobia: minified size, minified+gzipped size, dependency count, tree-shaking indicators (ES module entry, side effects) and the largest dependencies. If no version is given the latest published version is measured. Not meaningful for Node-only or native packages.

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_name": "<package_name>"
    },
    "name": "get_bundle_size"
  }
}

Input Schema

NameRequiredDescriptionDefault
versionNoExact version to measure, e.g. "18.2.0". Defaults to the latest published version.
package_nameYesnpm package name, e.g. "react" or "@mui/material".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and open-world, so the safety profile is covered. The description adds genuinely new behavioral context: the measurement source is Bundlephobia, the measurement target is the browser bundle, and the tool is meaningless for Node-only or native packages. It stops short of covering failure modes (unknown package/version) or rate limits.

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?

Three sentences, front-loaded with the verb and resource, then the return payload, then the default and the applicability caveat. Every clause carries information an agent needs and there is no filler.

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 only two fully-described parameters and no output schema, the description correctly compensates by enumerating what the call returns and stating the data source and applicability limits. Remaining gaps are error behavior and rate/availability constraints, which are secondary for a read-only lookup.

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 both parameters are already fully documented with patterns and worked examples. The description's only parameter-relevant sentence, that the latest published version is used when none is given, restates the schema's stated default rather than adding new meaning.

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 the specific verb 'Get' applied to a specific resource ('browser bundle size of an npm package version') and names the data source (Bundlephobia). The enumerated outputs (minified size, gzipped size, dependency count, tree-shaking indicators, largest dependencies) make it unmistakably distinct from siblings like get_download_stats and get_package_info.

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?

It gives explicit exclusions ('Not meaningful for Node-only or native packages') and states the default behavior when a version is omitted, which is real when-to-use guidance. It does not name a sibling alternative to use instead for Node-only packages, which keeps it short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.