Skip to main content
Glama
NAJEMWEHBE

unreal-ai-connection

apply_python_to_selection

Execute Python scripts on the currently selected actors and assets in the Unreal Engine editor. Automatically injects selection variables for direct use.

Instructions

Run user Python with the editor's current selection pre-bound: selection (selected level actors) and selected_assets (selected content-browser assets). Convenience wrapper around execute_unreal_python that injects the lookup boilerplate. Same output-capture caveat: ExecuteFile mode does not return stdout; use unreal.log marker + get_log_lines.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesPython source. The injected boilerplate makes `selection` (list of AActor) and `selected_assets` (list of UObject) available -- use either name directly.
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the injected boilerplate and the output-capture limitation (ExecuteFile mode does not return stdout), which are key behavioral details. However, it does not cover error handling, required permissions, or side effects, leaving some gaps in transparency.

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?

Two sentences, no wasted words. The first sentence states the core purpose and available variables, the second provides critical caveat and workaround. Front-loaded with essential information, achieving high conciseness.

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?

Given the tool's complexity (wrapper with injected boilerplate), the description adequately covers the purpose, injected variables, and output limitation. No output schema exists, but the caveat points to a workaround (`unreal.log marker + get_log_lines`). Missing some behavioral details (errors, permissions), but overall complete for the tool's scope.

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

Parameters4/5

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

Schema coverage is 100% with one parameter `code`, so baseline is 3. The description adds significant value by explaining that the injected boilerplate makes `selection` and `selected_assets` available directly, which the schema alone does not convey. This enhances the agent's understanding of how to use the parameter effectively.

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 it runs user Python with the editor's current selection pre-bound, naming the variables `selection` and `selected_assets`. It distinguishes itself from the sibling `execute_unreal_python` by explicitly calling itself a convenience wrapper that injects lookup boilerplate, making the purpose specific and unambiguous.

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

Usage Guidelines3/5

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

The description implies usage when the selection context is needed ('convenience wrapper'), but does not explicitly state when to use this vs. alternatives like `execute_unreal_python`. It mentions the same output-capture caveat, linking to a sibling tool, but lacks explicit when-to-use or when-not-to guidance.

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/NAJEMWEHBE/unreal-ai-connection'

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