Skip to main content
Glama

Resolve Generated Position

sourcemap_resolve
Read-only

Resolve an original source file, line, and column to the corresponding generated or minified position using a source map for deployed-code debugging.

Instructions

Reverse lookup: find the generated (minified) position for an original source position. Given a source file, line, and column, returns the generated line and column. All positions are 0-based.

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": {
      "file": "<file>",
      "source": "<source>",
      "line": "<line>",
      "column": "<column>"
    },
    "name": "sourcemap_resolve"
  }
}

Input Schema

NameRequiredDescriptionDefault
fileYesPath to a source map file (.map)
lineYesOriginal line number (0-based)
columnYesOriginal column number (0-based)
sourceYesOriginal source filename (as it appears in the source map)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds two useful behavioral facts — that it returns generated line and column, and that numbering is 0-based — but says nothing about what happens on a missing map file, unmapped positions, or malformed input.

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?

Three short sentences, front-loaded with the operation and followed by inputs, outputs, and the indexing convention. No filler or repetition.

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 simple four-parameter read-only tool with full schema coverage and annotations, the description covers purpose, inputs, and return values adequately. The only real gap is error/edge-case behavior for positions that cannot be resolved.

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 100%, so every parameter is already documented with type and 0-based semantics; the description only restates the 0-based convention. Slight ambiguity remains because 'source file' in the prose could be read as the .map path, while the schema distinguishes 'file' (the .map path) from 'source' (the original filename).

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 names a specific operation ('Reverse lookup') and resource ('generated (minified) position for an original source position'), which is concrete enough to distinguish it from a forward-lookup sibling. It stops short of naming the counterpart tool (e.g. sourcemap_lookup) explicitly, so the differentiation is inferred from the word 'reverse' rather than stated.

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?

Usage is implied by 'Given a source file, line, and column', which tells the agent the input shape but not when to prefer this over the sibling lookups. There is no statement of prerequisites (a .map file must exist) or of when NOT to use it.

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