rescue_python_snippet
Runs the original and repaired Python snippets in isolated WebAssembly sandboxes to verify fixes and provide before/after evidence for student code.
Instructions
Actually run a student's original and AI-repaired Python snippet in separate disposable WebAssembly child processes. Use after generating a minimal fix so the answer can show before/after evidence instead of an unverified suggestion.
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": {
"original_code": "<original_code>",
"candidate_code": "<candidate_code>"
},
"name": "rescue_python_snippet"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| test_cases | No | Optional stdin/output examples. Omit expected_stdout when only a successful run is required. | |
| original_code | Yes | The user's original Python code | |
| candidate_code | Yes | The minimally repaired Python code generated by the agent | |
| reported_error | No | Optional error text supplied by the user |