Skip to main content
Glama

Export Web Scripts

export_web_scripts

Exports retained JavaScript bytes from saved page-inspection or browser-scenario JSON into a new directory, writing scripts and a digest-verified manifest for later code analysis without refetching.

Instructions

Export JavaScript bytes already retained in one local inspect_web_page or capture_browser_scenario JSON capture (normalized result or complete Evidence). Writes scripts and a digest-verified manifest into an absent absolute output_directory. Returns all source URLs, script or transaction/event references, unavailable states, and an analysis_input for analyze_javascript_application when any bytes were exported. Include script sources in inspect_web_page or select capture.network.response_body in scenarios. No refetch or execution. Safe unambiguous URL layouts preserve relative module paths; versions, query variants, inline scripts, and path collisions are isolated with explicit resolution limitations.

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": {
      "capture_path": "/analysis/capture.json",
      "output_directory": "/analysis/exported-scripts"
    },
    "name": "export_web_scripts"
  }
}

Input Schema

NameRequiredDescriptionDefault
capture_pathYesAbsolute filesystem path to saved inspect_web_page or capture_browser_scenario JSON, normalized result or complete Evidence
output_directoryYesAbsolute absent filesystem directory for verified scripts and manifest; parent directory must exist

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only declare the four generic hints; the description adds substantial behavior beyond them: output goes into an absent absolute directory, a digest-verified manifest is written, all source URLs / script or transaction references / unavailable states are returned, and an analysis_input for analyze_javascript_application is produced when bytes exist. It also explains layout policy and collision isolation, which the agent could not infer from structured fields.

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-loaded with the core action and source, and nearly every clause carries operational information (preconditions, return contents, layout caveats). It is dense and sentence-heavy, with the layout/collision sentence packing several distinct ideas, but nothing is redundant filler.

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, the description fully covers return values (URLs, references, unavailable states, analysis_input) plus the directory-existence constraint and offline nature, which is everything needed to invoke it correctly. Complexity is moderate and the definition matches it.

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 description coverage is 100%, so both parameters are already documented, including that output_directory must be absent; baseline 3 applies. The description adds only marginal meaning — that the capture must be a single local normalized-result-or-Evidence JSON — without new syntax or format detail beyond the schema.

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 (export) and resource (JavaScript bytes retained in a local capture), and names the two producing siblings (inspect_web_page, capture_browser_scenario) whose output it consumes. The scope qualifiers — 'already retained', 'one local ... JSON capture', 'normalized result or complete Evidence' — let an agent tell it apart from refetching or analysis tools.

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 an explicit precondition for the tool to yield anything: include script sources in inspect_web_page or select capture.network.response_body in scenarios, and states 'No refetch or execution', so the agent knows it is an offline post-processing step. It does not explicitly route away from adjacent export siblings (e.g. export_evidence_bundle, compare_javascript_export_shapes), so it falls short of full when/when-not 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