Skip to main content
Glama

exec_in_session

Run Python code in a persistent O3DE session to maintain state across executions and automate editor and project workflows.

Instructions

Execute Python code in a persistent session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scriptYes
session_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.2/5.0
Behavior2/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 of behavioral disclosure. It only mentions 'persistent session,' implying statefulness, but does not disclose side effects of executing arbitrary code, whether variables persist across calls, security implications, or what happens if the session is invalid or expired.

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 a single sentence with no filler, clearly front-loading the action and context. It is concise while still conveying the essential purpose.

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

Completeness2/5

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

For a tool that executes arbitrary code in a persistent session, the description is under-specified. It lacks details about side effects, session lifecycle requirements, error behavior, and how it differs from run_editor_python. The presence of an output schema helps, but the description itself does not provide enough safety or context information for an agent to invoke it confidently.

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 has no property descriptions (0% coverage), but the parameter names are fairly self-explanatory: script is the Python code and session_id identifies the persistent session. The description reinforces that script contains Python code and the session is persistent, but it does not clarify session_id format or how script output is returned.

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 verb 'Execute' and the resource 'Python code in a persistent session.' The phrase 'persistent session' differentiates this from siblings like run_editor_python or one-off execution tools, so an agent can understand what the tool does at a glance.

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

Usage Guidelines2/5

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

No guidance is provided about when to use this tool versus alternatives like run_editor_python, begin_session, or get_session_vars. There is no mention of prerequisites such as whether the session must already exist, or when persistent execution is preferred over other execution modes.

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