Skip to main content
Glama

Trace Web Module Imports

trace_web_module_imports
Idempotent

Trace one exported website script's outgoing native ES imports/re-exports from a local manifest, optionally with import-map context, and return resolved URLs, source positions, or exact errors.

Instructions

Trace one exported website script's outgoing native ES imports/re-exports, using exact URL and optional selected import-map context. Reads a local export_web_scripts manifest and verifies the selected source's SHA-256/size; returns source positions, native resolved URLs or exact errors, every matching captured candidate and explicit unknown execution. Query/fragment identities are preserved. Computed imports and bundler IDs remain unknown. Select importer_url for unknown inline/document-base context. Caller-supplied Chromium executes only a trusted REA resolver stub in an owned context with page requests locally fulfilled/blocked; no captured application execution or asset refetch. Requires absolute REA_BROWSER_EXECUTABLE for literal imports. 32 MiB manifest, 16 MiB source, 4 MiB map and 20-second native deadline; cleanup may extend the deadline.

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": {
      "import_map": {
        "path": "/analysis/import-map.json",
        "base_url": "https://example.test/app/"
      },
      "script_index": 0,
      "manifest_path": "/analysis/exported-scripts/manifest.json"
    },
    "name": "trace_web_module_imports"
  }
}

Input Schema

NameRequiredDescriptionDefault
import_mapNo
importer_urlNoExplicit HTTP(S) module URL; useful when captured inline/base context is unknown
script_indexYesZero-based index in manifest.scripts
manifest_pathYesAbsolute path to an export_web_scripts manifest

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior5/5

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

The description goes well beyond the annotations, disclosing SHA-256/size verification of the selected source, that query/fragment identities are preserved, that computed imports and bundler IDs are reported as unknown, that only a trusted resolver stub runs in an owned context with page requests locally fulfilled/blocked, and that no application code executes and no assets are refetched. It also states the environment requirement (absolute REA_BROWSER_EXECUTABLE) and concrete resource limits (32 MiB manifest, 16 MiB source, 4 MiB map, 20-second deadline with possible cleanup extension). This is exactly the execution-safety and limit context the openWorldHint=true / readOnlyHint=false annotations cannot convey.

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

Conciseness3/5

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

Purpose is front-loaded, but the body is one dense run-on block that crams integrity checks, resolver semantics, environment requirements and four separate size/time limits into a single stream. Every fact is arguably load-bearing, yet readability suffers badly and the constraints would be far easier to scan as separate clauses. Efficient in word count, poor in structure.

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

Completeness5/5

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

With no output schema and a complex execution model, the description still covers what is returned (source positions, resolved URLs or exact errors, every matching captured candidate, explicit unknown execution), what is not returned (computed imports, bundler IDs), required environment, and hard limits. An agent has enough to call it correctly and to interpret the result without further documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75%, so the schema already documents manifest_path, script_index, importer_url and import_map. The description still adds real meaning: it explains why importer_url exists (unknown inline/document-base context) and that import-map context is optional and 'selected', plus that the manifest is read locally with integrity verification. It does not clarify the base_url/path pairing beyond the schema, which keeps it at 4.

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 opening clause names a specific verb and resource: 'Trace one exported website script's outgoing native ES imports/re-exports' with exact-URL and import-map scoping. That is far more precise than a restated title, and the scope ('one exported script', 'native') implicitly distinguishes it from broader bundle-analysis siblings. It stops short of naming an alternative explicitly, so it lands at 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The only routing guidance is parameter-level: 'Select importer_url for unknown inline/document-base context', which tells the agent when that argument applies. There is no statement of when to prefer this tool over trace_web_source_location or analyze_web_bundle, and no explicit when-not-to-use condition. Usage is implied by the described prerequisites (manifest must exist, REA_BROWSER_EXECUTABLE required) rather than stated as selection guidance.

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