get_script_source
Retrieve the original source code of a script using its ID. When source maps exist, returns the pre-compiled code (e.g., TypeScript) for easier debugging.
Instructions
Retrieves the source code for a script. If source maps are available, can return the original source instead of the generated/bundled code.
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": {
"session_id": "<session_id>",
"script_id": "<script_id>"
},
"name": "get_script_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| session_id | Yes | ID of the debugging session. | |
| script_id | Yes | ID of the script. Obtain from list_scripts or get_call_stack. | |
| prefer_original | No | If true and a source map exists, return the original source (e.g., TypeScript). Defaults to true. |