Skip to main content
Glama

Trace Javascript Semantics

trace_javascript_semantics
Idempotent

Trace static JavaScript data-flow, call/return, and closure relations from inline Evidence or retained references; dynamic/unsupported semantics remain explicit unknowns, not runtime execution claims.

Instructions

Trace static JavaScript data-flow, direct call/return, and closure relations from inline application Evidence or an exact same-session retained reference. Dynamic or unsupported semantics remain explicit unknowns; static reachability never claims runtime execution.

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": {
      "query": {
        "seed": {
          "kind": "semantic-node",
          "node_id": "jsrg_node_0000000000000000000000000000000000000000000000000000000000000000"
        },
        "direction": "backward-provenance"
      },
      "application": {
        "kind": "retained-evidence",
        "evidence_id": "ev_2a6371cd2a7665bdad6d37d9b3a69da558e9882a0696d195f1f1a7707f14b5e5"
      }
    },
    "name": "trace_javascript_semantics"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesNon-empty feature or text query to investigate.
applicationYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Beyond the annotations, it discloses two meaningful behaviors: unsupported or dynamic semantics are returned as explicit unknowns rather than silently dropped, and static reachability is never presented as proof of runtime execution. The session-bound retained-reference requirement is also surfaced. It does not explain what readOnlyHint=false implies for an analysis tool, which leaves a small gap.

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

Conciseness5/5

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

Two compact sentences with the operational scope front-loaded and the epistemic caveat second. No filler and no restatement of the title.

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

Completeness3/5

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

For a tool with a deeply nested query object and no output schema, the description covers input provenance and result caveats but omits how a caller obtains a valid seed node ID or which direction to pick for a given question, and gives no hint of the result shape. It is adequate but leaves the agent to reverse-engineer the query contract from the schema.

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?

With 50% schema description coverage, the description adds real value by characterizing the "application" parameter's two forms (inline Evidence vs. same-session retained reference) and by naming the relation families that correspond to the allowed_relations enum values (calls, returns-to-call, closure-capture). It says nothing about the seed kinds, the four direction values, or include_ambiguous_dynamic_edges, so the query side remains schema-only.

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 description uses a specific verb ("trace") and enumerates the exact resource class: static data-flow, direct call/return, and closure relations, plus the admissible input sources. It implicitly separates itself from runtime-oriented siblings by scoping to static semantics, but it never names an alternative tool, so an agent must infer the boundary from the word "static" alone.

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?

It tells the agent what inputs are acceptable ("inline application Evidence or an exact same-session retained reference") and implicitly excludes dynamic analysis, which is useful. However, there is no explicit statement of when to reach for this over observe_javascript_runtime, reconcile_javascript_runtime, or trace_call_path, and no preconditions such as requiring a prior analysis session to exist.

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