Eval
evalEvaluate a MicroPython expression on a connected board and return its result, enabling quick runtime checks and calculations over serial.
Instructions
Evaluate a MicroPython expression and return its result.
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": "eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | Absolute wall-clock timeout in seconds (default 30). | |
| expression | Yes | Python expression to evaluate (e.g. "2 + 2"). | |
| read_timeout | No | Per-character idle timeout in seconds (default 10). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |