Skip to main content
Glama
elemenopyunome

unreal-engine-mcp

execute_python

Execute Python code inside the Unreal Editor to automate tasks, manipulate actors and assets, and capture log output or evaluate expressions for immediate results.

Instructions

Run Python inside the running Unreal Editor.

With evaluate=False (default) code is run as statements and the captured log/print output is returned. With evaluate=True code must be a single expression and its value's repr is returned.

The unreal module is already imported in the editor's interpreter. Example (statements): import unreal for a in unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors(): unreal.log(a.get_actor_label()) Example (evaluate=True): len(unreal.get_editor_subsystem(unreal.EditorActorSubsystem).get_all_level_actors())

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
evaluateNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations, the description carries full burden. It discloses that the unreal module is pre-imported and how output is returned. However, it lacks warnings about potential destructive actions or security implications of executing arbitrary Python.

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

Conciseness4/5

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

The description is well-structured and front-loaded with the main purpose. Examples add value, though some redundancy exists in explaining evaluate modes. Overall efficient.

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 an output schema, the description covers both modes and return values. Missing details like error handling or timeouts, but adequate for typical use.

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

Parameters5/5

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

The schema has 0% description coverage, so the description compensates fully. It explains both parameters (code: string of Python, evaluate: boolean), their behavior, and provides concrete examples for each mode.

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 starts with 'Run Python inside the running Unreal Editor,' clearly stating the verb and resource. It distinguishes itself from sibling tools like run_python_file by focusing on inline code execution.

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

Usage Guidelines4/5

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

The description explains the two modes (statements vs. expression) with examples, but does not explicitly compare to alternatives like run_python_file or run_console_command, leaving some guidance gaps.

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/elemenopyunome/unreal-engine-mcp'

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