evaluate_at_frame
Evaluate a JavaScript expression in a paused call frame to read local/closure variables and this, returning a readable preview; fails when execution is not paused.
Instructions
Evaluate a JavaScript expression in the scope of a paused call frame — it reads local variables, closure variables and the current this, which evaluate_js cannot. Only works while execution is paused: when it is not, this returns an error rather than silently falling back to global scope. Results come back as a preview — class name plus a first level of properties, marked … where Chrome truncated it — readable, not parseable as the value. Use get_debugger_state to find frame indices.
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": {
"expression": "<expression>"
},
"name": "evaluate_at_frame"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes | JS source evaluated as-is. A function is not called — wrap it: `(() => { ... })()` | |
| frameIndex | No | Call frame index (0 = top frame); use get_debugger_state to find available frames |