python
Execute a single block of code using the local interpreter for quick calculations, data processing, or library calls.
Instructions
在本地 Python 3 解释器中执行单段代码(python -c)。适合快速计算、数据处理、调用 Python 库。
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": "python"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | 要执行的 Python 代码(-c 参数形式) | |
| timeout | No | 超时秒数(可选,默认 60) |