Skip to main content
Glama

wasm_run_vm_sandbox

Execute JavaScript code safely in a sandboxed VM with enforced timeout and zero filesystem access to prevent harmful operations.

Instructions

Executes JavaScript in an isolated Node.js VM context with strict execution timeout and zero filesystem access

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesJavaScript code string to evaluate
timeoutMsNoExecution timeout in ms (default: 2000)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It clearly discloses that execution is isolated, has a strict timeout, and has zero filesystem access. It does not mention network access or exact return behavior, which are minor gaps, but the core safety-relevant behavior is transparently described.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It conveys the action, environment, safety guarantees, and execution constraint in a compact and efficient manner.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter tool with no output schema, the description covers the essential context: what is executed, where it runs, timeout behavior, and filesystem restrictions. It does not explicitly state the return value format or network-access boundaries, which would improve completeness, but nothing essential to invoking the tool correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already documents both parameters with 100% coverage, so the baseline is 3. The description does not add per-parameter detail beyond what the schema provides, though it reinforces the timeout and sandboxing context. No meaningful semantic addition is made for 'code' or 'timeoutMs'.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Executes'), a clear resource ('JavaScript in an isolated Node.js VM context'), and key constraints ('strict execution timeout', 'zero filesystem access'). This makes the tool's purpose immediately clear and distinguishes it from sibling tools like wasm_run_module or algo_run_docker, which target different execution environments.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool should be used when you need to run JavaScript safely in a sandboxed Node.js environment, but it does not explicitly state when to prefer this over siblings like algo_run_sandboxed or wasm_run_module. It gives no exclusions or alternatives, so the agent is left to infer usage from the purpose.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ieeecsopen/mcp-cs'

If you have feedback or need assistance with the MCP directory API, please join our Discord server