Skip to main content
Glama

analyze_bundle_size

Assess npm package bundle size and performance impact. Get minified/gzipped sizes, tree-shaking support, and lighter alternative recommendations.

Instructions

Analyze bundle size impact and answer "how big is this package?" or "will this slow down my app?" questions. Returns minified size, gzipped size, tree-shaking support analysis, and generates recommendations for lighter alternatives if package is large. Includes comparison with similar packages and actionable advice.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoSpecific version (optional)
packageNameYesName of the package
Behavior4/5

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

With no annotations provided, the description carries the full behavioral disclosure burden. It does well by specifying what the tool returns (minified size, gzipped size, tree-shaking analysis), the conditional behavior (generates recommendations 'if package is large'), and that it includes comparison with similar packages. It lacks some details like whether network calls are made or how 'large' is determined, but still provides substantial transparency.

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?

The description is a single, information-dense sentence that front-loads the purpose, then efficiently enumerates key outputs and the conditional recommendation behavior. Every clause adds value without redundancy or fluff. It is appropriately sized for the tool's complexity.

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?

The description is largely complete for an analysis tool: it covers purpose, outputs, and conditional behavior, and the schema covers parameter semantics. However, there is no output schema, so the description could have indicated units (e.g., bytes/kB) or how to interpret results. Minor gaps prevent a perfect score, but it is well above minimal viability.

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%, and both parameters (packageName, version) have basic descriptions in the schema. The tool description adds no additional parameter-level meaning beyond what the schema already supplies; it refers to the package generally but does not explain version syntax or required vs. optional. Baseline 3 is appropriate given full schema coverage.

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 ('Analyze') with a clear resource ('bundle size') and states explicit question types it answers ('how big is this package?', 'will this slow down my app?'). It distinguishes itself from siblings by focusing on bundle size impact, including minified/gzipped sizes, tree-shaking support, and recommendations, which separates it from other analysis tools like analyze_quality or check_compatibility.

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?

The description gives clear use cases by framing the tool around common user questions, which implies when to choose it (bundle size concerns). However, it does not explicitly state when not to use it or mention alternatives like find_similar_packages or compare_packages, despite overlapping features (comparison with similar packages). This is clear context but lacks exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/alisaitteke/npm-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server