Skip to main content
Glama

run_editor_python

Run Python scripts in the O3DE Editor's embedded interpreter to automate tasks using the full azlmbr API when other tools fall short.

Instructions

Execute a Python script inside the running O3DE Editor.

The script runs in the editor's embedded Python interpreter and has access to the full azlmbr (EditorPythonBindings) API. Use this for custom editor automation that isn't covered by other tools.

Args: script: Python code to execute. Has access to azlmbr modules. timeout: Optional per-call execution timeout in seconds. The editor runs the script synchronously and does not reply until it finishes, so raise this for known-heavy operations. Omit to use the O3DE_EDITOR_TIMEOUT default (600s).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden. It discloses that the script runs synchronously in the editor's embedded interpreter, that the editor 'does not reply until it finishes,' and that the timeout can be raised for heavy operations. It also signals the powerful scope of access to the 'full azlmbr API,' which implies arbitrary editor state changes, though it does not warn about side effects explicitly.

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 well organized and front-loaded with the core purpose. Every sentence adds useful information: execution context, API access, use case, and timeout behavior. There is no fluff or redundancy.

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?

Given the output schema exists, return values need not be explained. The description covers what the tool does, when to use it, how scripts execute, and both parameters in sufficient detail. It is complete enough for an agent to invoke it correctly without additional inference.

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?

Schema description coverage is 0%, so the description fully compensates. It explains that the script parameter is Python code with access to azlmbr modules, and it gives detailed timeout semantics including synchrony, per-call behavior, when to raise it, and the 600-second O3DE_EDITOR_TIMEOUT default. This adds substantial meaning beyond the bare schema.

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 opens with a specific verb and resource: 'Execute a Python script inside the running O3DE Editor.' It further distinguishes the tool from siblings by stating it is for 'custom editor automation that isn't covered by other tools,' which separates it from the many targeted editor tools listed nearby.

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 gives clear usage context: 'Use this for custom editor automation that isn't covered by other tools.' It implies a when-not-to-use condition but does not name specific alternative tools or explicitly enumerate exclusions, so it stops short of full guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.