Skip to main content
Glama

Observe Javascript Runtime

observe_javascript_runtime
Idempotent

Passively attach to a Node/Electron V8 Inspector target to capture script and execution-context metadata without evaluating, pausing, or instrumenting code.

Instructions

Attach passively to one Node/Electron V8 Inspector target by supplying its loopback Inspector endpoint and target ID. The provider rechecks target presence and attachability; a Node discovery file location may remain unresolved. Loaded script locations are validated independently from Debugger.scriptParsed. Captures script and Runtime execution-context metadata. REA never evaluates, pauses, resumes, reads source, or instruments the target; require/import edges, EventEmitter activity, and Electron IPC remain explicit unknowns. Reconcile the result with static Application Graph Evidence using reconcile_javascript_runtime. The selected endpoint exposes every target it serves to this tool.

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_JAVASCRIPT_RUNTIME_TARGETS",
      "inspector_endpoint": "http://127.0.0.1:9229"
    },
    "name": "observe_javascript_runtime"
  }
}

Input Schema

NameRequiredDescriptionDefault
target_idYesExact CDP target identifier selected from the endpoint's target listing.
runtime_kindNo
observation_msNo
inspector_endpointYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations it discloses real operational traits: the provider rechecks target presence and attachability, a Node discovery file location may remain unresolved, script locations are validated independently of Debugger.scriptParsed, and the selected endpoint exposes every target it serves. It also enumerates what the tool never does (evaluate, pause, resume, read source, instrument) and which relationships remain unknown, which is the kind of context an agent cannot get from readOnlyHint/idempotentHint alone.

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 the action and scoping, and nearly every sentence contributes a constraint, a limitation, or a routing instruction. The style is terse and slightly disjointed (several clipped declarative sentences), but there is little wasted text.

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?

With no output schema, the description carries the burden of describing results, and it does so at a summary level ('script and Runtime execution-context metadata') plus a caveat about what is not observable. What remains missing is any indication of result shape beyond that summary and the meaning of observation_ms for a four-parameter, open-world tool.

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 only 25%, so the description must carry more weight. It explains the two required parameters well ('loopback Inspector endpoint and target ID'), but runtime_kind and observation_ms are never explained in the description even though the latter's enum and default are the only hints available, leaving half the parameters semantically thin.

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 definition leads with a specific verb and resource: 'Attach passively to one Node/Electron V8 Inspector target,' and scopes the outcome ('Captures script and Runtime execution-context metadata'). It also separates itself from two siblings by name — target IDs come from the endpoint's target listing and results are reconciled via reconcile_javascript_runtime — so an agent can place it without opening any 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 states the operating condition (one loopback Inspector endpoint plus a target ID) and mandates a follow-up step ('Reconcile the result with static Application Graph Evidence using reconcile_javascript_runtime'). It also sets the boundary against over-reading the results (require/import edges, EventEmitter activity and IPC are explicit unknowns). It stops short of explicit when-not-to-use guidance versus adjacent observation tools such as observe_web_execution or capture_electron_scenario.

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