Skip to main content
Glama

analyze_bundle_size

Analyze dependency bundle sizes to identify optimization opportunities and reduce application bloat in development projects.

Instructions

Analyze bundle size of dependencies

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectPathNoPath to project root

Implementation Reference

  • Handler for the 'analyze_bundle_size' tool: calls DependencyAnalyzer.analyzeBundleSize and formats the bundle size result for output.
    case 'analyze_bundle_size': { const size = await analyzer.analyzeBundleSize(projectPath); return { bundleSize: size, formatted: size ? Formatters.formatBytes(size) : 'N/A', }; }
  • Input schema for 'analyze_bundle_size' tool defining the expected projectPath parameter.
    inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'Path to project root', }, }, },
  • Registration of the 'analyze_bundle_size' tool in the dependencyAnalysisTools array.
    { name: 'analyze_bundle_size', description: 'Analyze bundle size of dependencies', inputSchema: { type: 'object', properties: { projectPath: { type: 'string', description: 'Path to project root', }, }, }, },
  • Helper method in DependencyAnalyzer class implementing the bundle size analysis logic (currently stubbed).
    async analyzeBundleSize(_projectPath: string): Promise<number | undefined> { // This is a simplified version. In production, we'd use bundle-phobia or webpack-bundle-analyzer // For now, return undefined return undefined; }

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/code-alchemist01/development-tools-mcp-Server'

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