Executes a GDScript expression or block in the Godot editor context (via EditorScript). Useful for querying engine state or performing quick operations. Args: - code (string): GDScript code to execute. Should be a valid expression or a series of statements. Has access to: Engine, ProjectSettings,...
AI agents invoke godot_run_script to trigger actions in Godot 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.
This tool directly executes arbitrary code (GDScript) in a live editor environment with access to engine state and editor interfaces. While the timeout prevents infinite loops, an AI agent could execute malicious GDScript to corrupt project state, exfiltrate data, or compromise the local Godot development environment.
From the tool's definition Tool name 'godot_run_script' and description states it 'Executes a GDScript expression or block in the Godot editor context'.
Attacks that exploit this kind of access
Executes a GDScript expression or block in the Godot editor context (via EditorScript). Useful for querying engine state or performing quick operations. Args: - code (string): GDScript code to execute. Should be a valid expression or a series of statements. Has access to: Engine, ProjectSettings, EditorInterface (in editor context). - timeout_ms (number, optional): Max execution time in milliseconds (default: 5000, max: 30000). Returns: { success: boolean, output: string, error?: string } Examples: - Use when:. It is categorised as a Execute tool in the Godot MCP Server MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
Register the Godot MCP Server MCP server in PolicyLayer and add a rule for godot_run_script: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Godot MCP Server. Nothing to install.
godot_run_script is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the godot_run_script rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for godot_run_script. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
godot_run_script is provided by the Godot MCP Server MCP server (ricky-yosh/godot-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →