Skip to main content
Glama

Analyze Web Bundle

analyze_web_bundle
Idempotent

Statically analyzes captured JavaScript from a selected CDP page to derive chunk graphs, route/endpoint candidates, vendor fingerprints, and WebMCP metadata; scripts are parsed, not executed.

Instructions

Capture JavaScript source from one selected CDP page and statically derive a chunk graph, route and endpoint candidates, vendor fingerprints, page-declared WebMCP metadata, and optionally fetch source maps from the selected target origin or explicitly requested origins. JavaScript is parsed but never executed.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "target_id": "TARGET_ID_FROM_LIST_BROWSER_TARGETS",
      "cdp_endpoint": "http://127.0.0.1:9222",
      "observation_ms": 500,
      "fetch_source_maps": false,
      "include_storage_keys": false,
      "include_script_sources": true,
      "include_accessibility_text": false
    },
    "name": "analyze_web_bundle"
  }
}

Input Schema

NameRequiredDescriptionDefault
target_idYesExact CDP target identifier selected from the endpoint's target listing.
cdp_endpointYesLiteral loopback Chrome DevTools Protocol endpoint.
observation_msNo
allowed_originsNo
fetch_source_mapsNo
include_console_textNoWhether to include console text in the result.
include_storage_keysNoWhether to include storage keys in the result.
include_script_sourcesNoWhether to include script sources in the result.
include_json_body_shapesNoWhether to include json body shapes in the result.
include_websocket_shapesNoWhether to include websocket shapes in the result.
include_accessibility_textNoWhether to include accessibility text in the result.
include_storage_fingerprintsNoWhether to include storage fingerprints in the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare openWorldHint=true and readOnlyHint=false, which could confuse an agent for an analysis tool; the description resolves this by disclosing that JavaScript is never executed and that network activity is limited to optionally fetching source maps from the target origin or explicitly requested origins. That explains the open-world/readOnly flags well. It stops short of describing capture cost, page impact, or size/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.

Conciseness4/5

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

It is a single dense sentence with no filler, and the core action is front-loaded. The trailing 'and optionally fetch...' clause makes it a run-on that would read better split, but no sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 12 parameters and no output schema, the description does well on derived artifacts and the execution-safety model, but it never mentions that the tool also captures console text, storage keys, accessibility text, JSON body shapes, or websocket shapes. An agent would have to open the schema to learn those capture dimensions exist, and the observation window is likewise unexplained.

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 75%, so the include_* booleans are documented in the schema itself. The description adds real meaning for two of the undocumented parameters — fetch_source_maps (optional source map retrieval) and allowed_origins (explicitly requested origins) — but says nothing about observation_ms, which governs how long the capture runs and is the one truly opaque input.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (capture + statically derive) and enumerates the concrete artifacts produced: chunk graph, route and endpoint candidates, vendor fingerprints, and page-declared WebMCP metadata. The phrase 'from one selected CDP page' and 'JavaScript is parsed but never executed' implicitly separates it from dynamic observation siblings, though no sibling is named outright.

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 usage context is clear: analyze the JavaScript of a single selected CDP target to get static structure rather than runtime behavior. It does not, however, state when to prefer this over adjacent tools such as export_web_scripts or analyze_javascript_application, and no exclusions are given.

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

Deploy Server

Other Tools