Skip to main content
Glama

Analyze Javascript Application

analyze_javascript_application
Idempotent

Reconstruct a local ASAR or extracted JavaScript app into an inline application graph without executing it, verifying integrity and returning nodes, edges, and coverage for selected source paths.

Instructions

Reconstruct one local ASAR or extracted JavaScript application as an inline application graph without executing it. Returns recovered graph nodes, edges, semantic relations, integrity contradictions, limitations, and coverage. Select source_paths to acquire and analyze only exact inventoried file paths; the complete artifact inventory and identity remain intact, and unselected sources remain explicit unknowns. Dependencies are not implicitly analyzed. Select detail summary to retain the complete analysis Evidence in this session and receive only its summary view, then inspect selected modules or pages with inspect_analysis_view. Summary detail reduces delivery, whereas source_paths bounds source analysis. Integrity mismatches fail by default; record-and-continue retains observed bytes as untrusted and marks graph coverage partial.

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": {
      "format": "auto",
      "input_path": "/Applications/Example.app/Contents/Resources/app.asar",
      "integrity_policy": "fail"
    },
    "name": "analyze_javascript_application"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNofull/complete returns the complete analysis Evidence inline. summary retains that complete Evidence in this session and returns its inspect_analysis_view summary; inspect pages, items or facets through normalized_result.parent_evidence_id.
formatNoDeclared input artifact format.
input_pathYesLocal filesystem path for input.
max_heap_mbNoMaximum V8 old-space heap in MiB for the isolated JavaScript source analyzer; defaults to 1024. This does not change the CLI/MCP process heap. When REA runs on Bun, which ignores V8 heap flags, Windows instead limits the analyzer's committed memory to this budget plus a 512 MiB runtime reserve; other Bun hosts enforce no limit.
source_pathsNoExact relevant file paths from the artifact inventory, relative to the application root, analyzed in first-request order before unselected scopes; no globs or implicit dependencies. Omit to analyze all sources.
integrity_policyNo
max_semantic_nodesNoMaximum retained semantic nodes across the application; defaults to 100000. Worker heap and parent result admission remain enforced.
analysis_timeout_msNoMaximum startup, analysis and transfer time per JavaScript source, in milliseconds; defaults to 300000. On timeout, return collected partial Evidence and stop the analysis.
max_semantic_nodes_per_fileNoMaximum retained semantic nodes per source file; defaults to 20000, additionally bounded by max_semantic_nodes and memory/transfer limits.

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?

Beyond the annotations it discloses the behaviors that actually matter: the analyzer is isolated and does not execute the target, complete Evidence is retained in-session under summary mode via parent_evidence_id, integrity policy trades strictness for partial/untrusted coverage, and timeouts return partial Evidence. It even clarifies that max_heap_mb does not change the host process heap, which the 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.

Conciseness4/5

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

It is front-loaded with purpose before mode selection and policy details, and almost every clause carries distinct information. There is mild redundancy — the summary/detail-vs-source_paths distinction is made twice and 'without executing it' is echoed by 'isolated JavaScript source analyzer' — but nothing is 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?

For a nine-parameter tool with no output schema, the description still enumerates what comes back (nodes, edges, semantic relations, integrity contradictions, limitations, coverage), how to page into the retained result, and the failure/partial-result modes. An agent has enough to invoke it correctly and to know where to go next.

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 already 89%, so the schema does most of the work; the description nonetheless adds real meaning for the uncovered integrity_policy ('fail by default', 'record-and-continue retains observed bytes as untrusted and marks graph coverage partial') and contrasts the two scoping controls ('Summary detail reduces delivery, whereas source_paths bounds source analysis'). That contrast is the most valuable contribution, but most other parameters are only restated.

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?

The opening sentence gives a specific verb (Reconstruct), a bounded resource (one local ASAR or extracted JavaScript application), an output form (inline application graph), and a key constraint (without executing it). It also routes the summary-mode follow-up to inspect_analysis_view, so an agent can tell what this tool produces versus the inspection tool that reads its retained Evidence.

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 description clearly states the conditions that select its modes: 'Select detail summary... then inspect selected modules or pages with inspect_analysis_view', 'Dependencies are not implicitly analyzed', and 'Integrity mismatches fail by default'. It does not, however, say when a caller should reach for this tool instead of other JavaScript analysis or source recovery siblings, so the routing context is clear but not exhaustive.

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