godot_run_script

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,...

Server Godot MCP Server ricky-yosh/godot-mcp-server
Category Execute
Risk class High
Parameters 00 required

What godot_run_script does on Godot MCP Server

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.

Why godot_run_script needs a policy

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'.

Questions about godot_run_script

What does the godot_run_script tool do? +

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.

How do I enforce a policy on godot_run_script? +

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.

What risk level is godot_run_script? +

godot_run_script is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.

Can I rate-limit godot_run_script? +

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.

How do I block godot_run_script completely? +

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.

What MCP server provides godot_run_script? +

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.

// LOOK UP ANOTHER 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 →

// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.