execute_code_with_variables
Execute JavaScript or Python code with dynamic input variables that can be defined and passed as key-value pairs
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": {
"language": "<language>",
"code": "<code>"
},
"name": "execute_code_with_variables"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | Code to execute | |
| input | No | Additional input data for the program (stdin) | |
| timeout | No | Execution timeout in milliseconds (max 60000) | |
| language | Yes | Programming language to execute | |
| variables | No | Dynamic input variables as key-value pairs. Can be a JSON object or a JSON string (e.g., {"name": "John", "age": 25, "items": [1,2,3]} or "{\"name\": \"John\", \"age\": 25}") | |
| memoryLimit | No | Memory limit in MB (max 512) | |
| enableNetworking | No | Enable network access for this execution |