Get Package Costs
get_package_costsIdentify npm packages consuming the most CPU self-time from a profile, helping you decide which dependencies to replace, lazy-load, or avoid.
Instructions
Aggregate CPU self-time by npm package. Identifies which third-party dependencies are consuming the most CPU, by parsing node_modules paths from the profile. Useful for deciding which packages to replace, lazy-load, or avoid. Scoped packages (e.g. @babel/core) are handled correctly.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of packages to return, sorted by self-time (default: 10) | |
| profileId | Yes | Profile ID returned by load_profile |