Skip to main content
Glama

measure_bundle

Read-onlyIdempotent

Analyze the makeup of a React Native/Expo release JS bundle from its source map, showing per-package bytes and duplicates. Compare with an older map to see size changes.

Instructions

What the release JavaScript bundle of a React Native or Expo app is made of, measured from the source map a release build already wrote (Hermes bytecode maps included): bytes and share for the app code and each package, packages bundled more than once, and the largest JSON. With base (an older map), what was added, removed or changed size since that build. Nothing is built or run; returns found:false with how to produce a map if there is none.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mapNoSource map of the release bundle, relative to path (for example android/app/build/generated/sourcemaps/react/release/index.android.bundle.map). Optional: without it the usual React Native and Expo output folders are searched.
baseNoAn older release source map, relative to path, to compare against: the result then lists packages added, removed or changed in size. Optional.
pathYesFolder of the React Native or Expo app (the one with package.json), absolute or relative to the workspace. Must be inside the folders this server may read.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive, closed-world). The description adds genuinely new behavioral context: nothing is built or run, and a missing map yields found:false with remediation guidance. It stops short of permission or performance details, so not a 5.

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

Conciseness4/5

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

Front-loads what is measured, then the diff behavior, then the no-build/error fallback — a logical order with no filler. It is dense and long, but each clause carries information an agent needs.

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 no output schema, the description does the work of describing returns: bytes and share per package, duplicate packages, largest JSON, diff results, and the found:false shape. Complete enough to call correctly, though it could be more explicit about the failure payload structure.

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 coverage is 100%, so all three parameters are already documented in the schema (including the map default-search behavior and the base diff semantics). The description restates the base-comparison outcome without adding syntax or format detail beyond it, matching the baseline 3.

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 (measure) and resource (release JavaScript bundle composition) plus the exact data source (the source map a release build already wrote). Clearly separable from siblings like scan_project or check_library, which inspect different artifacts.

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 conditional context: pass base to get a diff against an older build, and the map param is optional because standard RN/Expo output folders are searched. No explicit when-not or named alternative tool, but siblings do not overlap enough to require it.

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