Skip to main content
Glama

unreal_execute_python

Destructive

Execute arbitrary Python code inside the Unreal Editor to perform custom operations, access the full Unreal Python API, and handle tasks not covered by dedicated tools.

Instructions

Run arbitrary Python inside the running Unreal Editor.

This is the general-purpose escape hatch for anything the dedicated tools do not cover. Prefer a specific tool when one exists, because those return structured data while this returns raw console output.

The code runs in the editor's own interpreter with full access to the unreal module, so it can modify or delete project content. It is not sandboxed.

Args: params (ExecuteInput): Validated input containing: - code (str): Python source to run - evaluate (bool): True for single-expression evaluation (default False)

Returns: str: JSON with the following schema: { "success": bool, # False if Unreal reported the command as failed "result": str, # Value for evaluate=True, else Unreal's status string "output": str # Everything the script printed / logged } On failure: "Error: "

Examples: - Use when: "how many static meshes are in /Game/Props?" -> code that counts them and prints the number - Use when: calling an unreal API no other tool exposes - Don't use when: listing actors or assets (use unreal_list_actors / unreal_list_assets, which paginate and return structured fields)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

The description explicitly states the code 'can modify or delete project content' and is 'not sandboxed', which is consistent with the destructiveHint annotation. It adds valuable context by explaining the return value behavior ('returns raw console output' vs structured data) and hinting at the risk profile. While annotations already flag destructiveness, the description's blunt warning about the ability to 'modify or delete project content' is a strong, behavior-informing disclosure. It doesn't detail specific permission requirements, but for an escape-hatch tool in this context, the warning is quite potent.

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

Conciseness5/5

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

The description is perfectly structured and incredibly efficient, mixing a strong opening statement, a crisp warning, and a helpful 'Args:' and 'Examples:' breakdown. Every section earns its place, front-loading the purpose and crucial safety warning before diving into parameter semantics. It's a model of clarity and conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 'escape hatch' tool, the description provides exactly what's needed to use it correctly and safely. It clearly states the return schema (including success/result/output structure and error format), the difference between evaluate modes, and the all-important 'don't use this if a dedicated tool exists' guidance. Given its role as a fallback, the clarity on side effects and return format is complete and sufficient.

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

Parameters3/5

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

The schema description coverage is reported at 0%, meaning the description itself must carry the semantic weight. The description names the parameters ('code', 'evaluate') and gives a high-level summary of each. For instance, it contrasts 'single-expression evaluation' with 'validated input'. While it adds meaning, it's not exceptionally deep about the exact string semantics beyond what the schema's 'description' fields could hold. Since schema coverage is 0%, this is better than average but doesn't fully compensate for the lack of schema semantics, placing it at a solid 3.

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 clearly states the tool 'Run arbitrary Python inside the running Unreal Editor' and explicitly frames it as a 'general-purpose escape hatch', which strongly distinguishes it from siblings. It reinforces this by naming the specific siblings it is not ('unreal_list_actors / unreal_list_assets') and what makes them different (structured, paginated data).

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use ('how many static meshes are in /Game/Props?', 'calling an unreal API no other tool exposes') and, crucially, when not to use it ('Don't use when: listing actors or assets') with reasons why alternatives are superior. It also states 'Prefer a specific tool when one exists' as a general rule, which is an explicit routing directive.

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/Christancho-co/unreal-mcp'

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