Execute Code With Variables
execute_code_with_variablesExecute JavaScript or Python code with dynamic input variables that can be defined and passed as key-value pairs
When to Use
Use this tool when you need to execute javascript or python code with dynamic input variables that can be defined and passed as key-value pairs. This is part of the Code Runner provider on xpay✦.
MCP Connection
Connect to xpay✦ to access this tool (and 3+ others):
{
"mcpServers": {
"xpay": {
"url": "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
}
}
}
For Claude Code:
claude mcp add --transport http xpay "https://mcp.xpay.sh/mcp?key=YOUR_API_KEY"
How to Execute
Use the xpay✦ meta-tools to run this tool:
xpay_details— Get full input schema:xpay_details("code-runner/execute_code_with_variables")xpay_run— Execute:xpay_run("code-runner/execute_code_with_variables", { ...inputs })
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Additional input data for the program (stdin) |
variables | string | 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}") |
code | string | Yes | Code to execute |
enableNetworking | boolean | No | Enable network access for this execution |
language | string | Yes | Programming language to execute |
memoryLimit | number | No | Memory limit in MB (max 512) |
timeout | number | No | Execution timeout in milliseconds (max 60000) |
Pricing
- Cost: $0.01/call
- Balance check: Use
xpay_balanceto check remaining credits - Get your API key at xpay.tools — $5 free credits included
Related Skills
- Code Runner (all tools) — 4 tools
- Execute Code — $0.01/call
- Get Capabilities — $0.01/call
- Validate Code — $0.01/call
Links
- Tool page: https://xpay.tools/code-runner/execute-code-with-variables/
- Provider: https://xpay.tools/code-runner/
- All tools: https://xpay.tools/explore
How to Execute
Input Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Additional input data for the program (stdin) |
variables | string | 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}") |
code | string | Yes | Code to execute |
enableNetworking | boolean | No | Enable network access for this execution |
language | string | Yes | Programming language to execute |
memoryLimit | number | No | Memory limit in MB (max 512) |
timeout | number | No | Execution timeout in milliseconds (max 60000) |
Related Tools from Code Runner
Install Skill
Pricing
Cost
$0.01/call
Model
Flat rate
Provider
Code Runner

