run-js-code
Execute JavaScript code securely in a sandbox environment, with options for NPM commands, JSON parsing, and configurable timeouts. Ideal for testing and automation tasks on the Dumpling AI MCP Server.
Instructions
Execute JavaScript code in a sandbox.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
code | Yes | JavaScript code | |
commands | No | NPM install commands | |
memory | No | Memory allocation in MB | |
parseJson | No | Parse output as JSON | |
timeout | No | Execution timeout in ms |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"code": {
"description": "JavaScript code",
"type": "string"
},
"commands": {
"description": "NPM install commands",
"type": "string"
},
"memory": {
"description": "Memory allocation in MB",
"type": "number"
},
"parseJson": {
"description": "Parse output as JSON",
"type": "boolean"
},
"timeout": {
"description": "Execution timeout in ms",
"type": "number"
}
},
"required": [
"code"
],
"type": "object"
}