micropython_eval
Evaluate Python expressions on MicroPython boards to test code or check device state, returning the result as a string.
Instructions
MicroPython ボードで式を評価し、結果を文字列で返す。
Args: expression: 評価する Python 式 (例: "1 + 1", "machine.freq()")
Returns: ok: 評価に成功したら True result: 評価結果の文字列表現 error: エラー時のメッセージ。成功時は None
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": "micropython_eval"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expression | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | Yes | ||
| result | Yes |