# execute_game_script

🔴 Game must be running. Execute a GDScript snippet in the running game context

Agent View of the PolicyLayer registry record for `execute_game_script`. HTML page: https://policylayer.com/tools/keeveeg-godot-mcp/execute-game-script

## Facts

- Tool: `execute_game_script`
- Server: Godot (`@keeveeg/godot-mcp`) — https://policylayer.com/tools/keeveeg-godot-mcp.md
- Install: `npx -y @keeveeg/godot-mcp`
- Homepage: https://www.npmjs.com/package/@keeveeg/godot-mcp
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 1 (1 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `code` | string | yes | GDScript code to execute |

Parameters from the server's own tool schema.

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

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "execute_game_script",
    "arguments": {
      "code": "<code>"
    }
  }
}
```

## Why execute_game_script is rated High

This tool runs arbitrary GDScript code in an active game environment. An AI agent could misuse it to crash the game, corrupt game state, access sensitive data, trigger unintended actions, or compromise the game's integrity. The effects are entirely dependent on the script passed as input, making this a high-risk execution endpoint warranting 'critical' severity.

From the tool's own definition: "Tool name 'execute_game_script' combined with description 'Execute a GDScript snippet in the running game context' directly indicates arbitrary code execution."

Risk signals: Accepts freeform code/query input (code)

## Use case

AI agents invoke execute_game_script to trigger actions in Godot. 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 Godot:

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

## Other tools on Godot (320)

- `clear_editor_log` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/clear-editor-log.md
- `clear_editor_selection` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/clear-editor-selection.md
- `clear_output` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/clear-output.md
- `delete_export_preset` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-export-preset.md
- `delete_node` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-node.md
- `delete_particles` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-particles.md
- `delete_resource` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-resource.md
- `delete_save_file` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-save-file.md
- `delete_scene` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-scene.md
- `delete_script` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-script.md
- `delete_shader` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-shader.md
- `delete_theme` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/delete-theme.md
- `remove_animation` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-animation.md
- `remove_audio_bus` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-audio-bus.md
- `remove_audio_player` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-audio-player.md
- `remove_autoload` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-autoload.md
- `remove_autoload_config` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-autoload-config.md
- `remove_input_action` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-input-action.md
- `remove_navigation_agent` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-navigation-agent.md
- `remove_navigation_link` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-navigation-link.md
- `remove_navigation_region` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/remove-navigation-region.md
- `reset_editor_layout` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/reset-editor-layout.md
- `tilemap_clear` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/tilemap-clear.md
- `uninstall_addon` — Destructive — https://policylayer.com/tools/keeveeg-godot-mcp/uninstall-addon.md
- `bake_navigation_mesh` — Execute — https://policylayer.com/tools/keeveeg-godot-mcp/bake-navigation-mesh.md
- `capture_frames` — Execute — https://policylayer.com/tools/keeveeg-godot-mcp/capture-frames.md
- `click_button_by_text` — Execute — https://policylayer.com/tools/keeveeg-godot-mcp/click-button-by-text.md
- `continue_execution` — Execute — https://policylayer.com/tools/keeveeg-godot-mcp/continue-execution.md
- `evaluate_expression` — Execute — https://policylayer.com/tools/keeveeg-godot-mcp/evaluate-expression.md
- `execute_editor_script` — Execute — https://policylayer.com/tools/keeveeg-godot-mcp/execute-editor-script.md
- …and 290 more: https://policylayer.com/tools/keeveeg-godot-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=keeveeg-godot-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/keeveeg-godot-mcp
