Code to flowchart with dry run
code_to_flowchartTurn source code (C, C++, Java, Python or JavaScript, up to 80 lines) into a lab-record style flowchart where every box is linked to its code lines, plus a step-by-step dry run for a sample input (current line, box and variables at each step). Returns a link that opens it ready to play (▶ Explain), the program output and Mermaid code. Uses 1 AI credit.
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": {
"code": "<code>"
},
"name": "code_to_flowchart"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The program or function, as source code. | |
| language | No | Optional; detected if left out. | |
| sample_input | No | Optional input for the dry run, e.g. "n = 5". Picked automatically if left out. |