# run_javascript

Execute JavaScript code or script with Node.js

Agent View of the PolicyLayer registry record for `run_javascript`. HTML page: https://policylayer.com/tools/agentics-ai-code-mcp/run-javascript

## Facts

- Tool: `run_javascript`
- Server: Code MCP Server (`agentics-ai/code-mcp`) — https://policylayer.com/tools/agentics-ai-code-mcp.md
- Homepage: https://github.com/agentics-ai/code-mcp
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "run_javascript",
    "arguments": {}
  }
}
```

## Why run_javascript is rated High

This tool executes arbitrary JavaScript code in a Node.js runtime environment. Execution tools are categorized as Execute because their effects depend entirely on the arguments provided (the code to run). The blast radius is high: a malicious or mistaken agent could run code that accesses the filesystem, makes network requests, modifies system state, or exfiltrates sensitive data.

From the tool's own definition: "Tool name is 'run_javascript' and description states 'Execute JavaScript code or script with Node.js' - the word 'Execute' directly indicates code execution capability."

## Use case

AI agents invoke run_javascript to trigger actions in Code MCP Server. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Code MCP Server:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "run_javascript": {
      "limits": [
        {
          "counter": "run_javascript_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Code MCP Server (72)

- `delete_file` — Destructive — https://policylayer.com/tools/agentics-ai-code-mcp/delete-file.md
- `docker_cleanup` — Destructive — https://policylayer.com/tools/agentics-ai-code-mcp/docker-cleanup.md
- `docker_containers` — Destructive — https://policylayer.com/tools/agentics-ai-code-mcp/docker-containers.md
- `remove_allowed_command` — Destructive — https://policylayer.com/tools/agentics-ai-code-mcp/remove-allowed-command.md
- `rollback_session` — Destructive — https://policylayer.com/tools/agentics-ai-code-mcp/rollback-session.md
- `docker_build` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-build.md
- `docker_compose` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-compose.md
- `docker_images` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-images.md
- `docker_networks` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-networks.md
- `docker_run` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-run.md
- `docker_system` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-system.md
- `docker_volumes` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/docker-volumes.md
- `git_push` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/git-push.md
- `install_dependencies` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/install-dependencies.md
- `npm_command` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/npm-command.md
- `pip_install` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/pip-install.md
- `run_command` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/run-command.md
- `run_custom_tool` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/run-custom-tool.md
- `run_python` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/run-python.md
- `run_tests` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/run-tests.md
- `secure_run_command` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/secure-run-command.md
- `secure_run_command_sequence` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/secure-run-command-sequence.md
- `start_coding_session` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/start-coding-session.md
- `start_server` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/start-server.md
- `stop_server` — Execute — https://policylayer.com/tools/agentics-ai-code-mcp/stop-server.md
- `end_coding_session` — Other — https://policylayer.com/tools/agentics-ai-code-mcp/end-coding-session.md
- `analyze_code` — Read — https://policylayer.com/tools/agentics-ai-code-mcp/analyze-code.md
- `analyze_file_differences` — Read — https://policylayer.com/tools/agentics-ai-code-mcp/analyze-file-differences.md
- `compare_commits` — Read — https://policylayer.com/tools/agentics-ai-code-mcp/compare-commits.md
- `compare_files` — Read — https://policylayer.com/tools/agentics-ai-code-mcp/compare-files.md
- …and 42 more: https://policylayer.com/tools/agentics-ai-code-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=agentics-ai-code-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/agentics-ai-code-mcp
