Extract Original Sources
sourcemap_extract_sourcesExtract embedded original source files from a source map to disk, writing each sourcesContent entry while preserving directory structure and handling webpack://, file://, and relative path prefixes.
Instructions
Extract all embedded original source files from a source map to disk. Writes each sourcesContent entry as a file, preserving the directory structure. Handles webpack://, file://, and relative path prefixes. Use this after fetching a source map to get the full original source tree.
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>"
},
"name": "sourcemap_extract_sources"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Path to a source map file (.map) | |
| outputDir | No | Directory to extract source files to (default: /tmp/srcmap-sources) | /tmp/srcmap-sources |