Skip to main content
Glama

Trace Web Source Location

trace_web_source_location
Idempotent

Trace a generated position in an exported website script back to its original source using a paired local source map, verifying SHA-256 and byte identities and returning resolved sources and positions.

Instructions

Trace one generated position in an exported website script through an explicitly paired local source map. Verifies manifest, selected script and map SHA-256/byte identities; returns every equal-position mapping, reported source/root, resolved source URL, embedded sourcesContent and original position inline. One-based lines and zero-based UTF-16 columns; greatest generated position <= requested across lines. Duplicate sources and generated-only mappings remain distinct. Caller-selected pairing does not establish deployment authenticity or execution. Regular maps and inline indexed sections only; external section URLs are unsupported. No network access or application execution; uses the pinned upstream codec in an owned Node process with private temporary files, independent 192 MiB old-generation heap and 20-second deadline. 4 MiB map, 32 MiB reply; complete evidence or actionable resource failure. Cleanup may extend the deadline.

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": {
      "source_map": {
        "url": "https://example.test/app.js.map",
        "path": "/analysis/app.js.map"
      },
      "script_index": 0,
      "manifest_path": "/analysis/scripts/manifest.json",
      "generated_position": {
        "line": 1,
        "column": 25
      }
    },
    "name": "trace_web_source_location"
  }
}

Input Schema

NameRequiredDescriptionDefault
source_mapYes
script_indexYesZero-based index in manifest.scripts
manifest_pathYesAbsolute export_web_scripts manifest path
generated_positionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Very rich beyond the annotations: it discloses SHA-256/byte identity verification of manifest, script and map, no network access or code execution, an owned Node process with private temp files, a 192 MiB old-generation heap, a 20-second deadline, reply/size caps, and that cleanup may extend the deadline. One point of tension is left unresolved: annotations declare openWorldHint=true while the description emphasizes purely local, no-fetch operation, so an agent cannot tell whether the open-world flag refers to arbitrary filesystem reads. readOnlyHint=false is at least consistent with the temporary-file writes mentioned.

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 action and its scope, then limits, then failure modes; nothing is decorative. The telegraphic, semicolon-chained style packs a lot into a few sentences but makes resource limits and guarantees slightly harder to scan than discrete sentences would.

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?

No output schema exists, and the description explicitly enumerates what comes back: every equal-position mapping, reported source/root, resolved source URL, embedded sourcesContent and original position. Combined with the size/deadline limits and the 'complete evidence or actionable resource failure' guarantee, an agent has enough to call it and interpret the result.

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?

With only 50% schema description coverage, the description compensates by defining position semantics precisely (one-based lines, zero-based UTF-16 columns, greatest generated position <= requested across lines) and by explaining that duplicate sources and generated-only mappings stay distinct. The source_map.url role and script_index meaning are already in the schema, so no significant gap remains.

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?

Names a specific verb and resource: 'Trace one generated position in an exported website script through an explicitly paired local source map.' The scope (single position, single script, caller-paired map) clearly separates it from sibling tracing tools such as trace_web_module_imports and from bundle-level tools, without needing to open a 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?

Applicability is stated through hard preconditions and exclusions: the map must be explicitly paired, only regular maps and inline indexed sections are supported, external section URLs are rejected, and caller-selected pairing does not establish deployment authenticity. It does not name a specific alternative tool for the cases it excludes (e.g., external section URLs, unsigned pairing), so it falls short of explicit routing 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