Skip to main content
Glama

Analyze Javascript Application

analyze_javascript_application
Idempotent

Reconstruct a local ASAR or extracted JavaScript app as an inline application graph without executing it, recovering nodes, edges, semantic relations, integrity issues, and coverage.

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. Select a javascript-routes view with summary detail to query deduplicated static patterns, source-linked occurrences, source status or interpretation gaps with filters, fields and paging. Static routes do not establish reachability or the full application route set. 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. Timeout recovery: returned provider_timeout uses the per-source analysis_timeout_ms budget. A host-only 'timed out awaiting tools/call' needs a longer client tool deadline, not a larger analysis_timeout_ms. Never repeat the unchanged call to test whether that timeout persists; report the host setting if configuration is not editable (Codex: mcp_servers..tool_timeout_sec, seconds).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input_path": "<input_path>"
    },
    "name": "analyze_javascript_application"
  }
}

Input Schema

NameRequiredDescriptionDefault
viewNo
detailNo
formatNoDeclared input artifact format.
input_pathYesAbsolute path to the JavaScript application on the machine running REA.
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_unknownsNoMaximum retained semantic unknown records across the application; defaults to 100000. Omitted emission occurrences are counted by family and reason.
max_semantic_nodes_per_fileNoMaximum retained semantic nodes per source file; defaults to 20000, additionally bounded by max_semantic_nodes and memory/transfer limits.
max_semantic_unknowns_per_fileNoMaximum retained semantic unknown records per source file; defaults to 20000, additionally bounded by max_semantic_unknowns and memory/transfer limits.

Output Schema

NameRequiredDescriptionDefault
subjectYes
providerYes
authorityYes
locationsYes
operationYes
confidenceYes
parametersYes
raw_resultYes
environmentYes
evidence_idYes
limitationsYes
evidence_linksYes
predicate_typeYes
analysis_profileYes
caller_input_pathNo
normalized_resultYes
caller_input_pathsNo
relationship_coverageYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.25.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 that the target is never executed, that integrity mismatches fail by default while record-and-continue retains bytes as untrusted and marks coverage partial, that timeouts return partial evidence, and that an unchanged call must not be repeated to retest a host timeout. It also distinguishes provider_timeout from a host-side tools/call deadline and names the client setting to change.

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?

The purpose is front-loaded and nearly every sentence carries operational information, but the whole definition is one dense run-on paragraph with no structural breaks. It restates the same concepts twice ('Summary detail reduces delivery, whereas source_paths bounds source analysis' repeats the earlier summary/source_paths guidance), which costs readability at this length.

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

Completeness4/5

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

For a 12-parameter, nested-schema tool with an output schema and annotations, the description covers the decisions an agent must make: view/detail selection, source bounding, integrity failure policy, timeout recovery, and known limitations. The nested 'view' object itself is only partially characterized (the javascript-routes variant is described, other view shapes are not), leaving a small gap.

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 baseline is 3; the description adds real meaning for the weaker parameters — source_paths is exact inventoried paths with no globs or implicit dependencies, detail=summary retains evidence in-session and returns only a summary view, and integrity_policy defaults to fail versus record-and-continue. The numeric heap and semantic-node limits are left to the schema text, which already documents them.

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 names a specific verb and resource ('Reconstruct one local ASAR or extracted JavaScript application as an inline application graph') and adds the key scope constraint 'without executing it'. An agent can distinguish this from sibling tools such as analyze_function or inspect_analysis_view without opening either schema.

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?

It gives concrete routing guidance: use summary detail plus inspect_analysis_view to inspect selected modules/pages, use a javascript-routes view with summary detail for static route queries, and use source_paths to bound analysis. It also states an exclusion ('Dependencies are not implicitly analyzed'). It stops short of an explicit when-not-to-use-this-tool statement relative to siblings like analyze_function.

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