Skip to main content
Glama

execute_editor_menu_item

Executes a project-defined Unity Editor MenuItem by exact path, returns execution, settle, before/after state, duration, and synchronous errors, and blocks built-in menu roots.

Instructions

Execute a project-defined custom Unity Editor MenuItem by exact path and return correlated execution, settle, before/after state, duration, and synchronous Unity errors. Built-in Unity roots such as File, Edit, Assets, GameObject, Component, Window, and Help are blocked. Compilation/update activity, dirty scenes, and Play Mode fail closed unless the relevant explicit override is supplied.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "menuPath": "<menuPath>"
    },
    "name": "execute_editor_menu_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
menuPathYesExact project-defined MenuItem path
timeoutMsNoMaximum time for execution result and Editor settling
waitForSettledNoWait for compilation and asset updates started by the menu item
allowDirtySceneNoAllow execution while the active scene has unsaved changes
allowInPlayModeNoAllow execution while Unity is in or entering Play Mode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.7.7

TDQS

A4.5/5.0
Behavior4/5

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

No annotations exist, so the description carries the full burden, and it does well: fail-closed preconditions, blocked roots, captured before/after state, settle waiting, duration, and synchronous error reporting are all disclosed. What is not stated is the risk profile of the executed menu item itself — arbitrary project code whose side effects are unknown — which an agent arguably needs before invoking a mutation-capable tool.

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, front-loaded with purpose and return payload, then immediately the guardrails. No filler, no restatement of the tool name, and every clause adds information an agent needs before calling.

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?

Five parameters, no annotations, and no output schema — the description compensates by naming the return payload (execution, settle, before/after state, duration, synchronous errors) and all fail-closed conditions. An agent can decide whether to call it and predict the outcome shape without opening the schema.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning: "exact path" signals the menuPath must match precisely rather than fuzzy-match, and the "relevant explicit override" phrasing ties the three boolean gates to the fail-closed behavior described above. It stops short of documenting timeout or settle-cost tradeoffs.

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?

States a specific verb and resource ("Execute a project-defined custom Unity Editor MenuItem by exact path") and enumerates what it returns. The scope qualifier "project-defined custom" plus the blocking of built-in Unity roots (File, Edit, Assets, etc.) makes it unmistakable against generic editor-manipulation siblings like create_gameobject or control_play_mode.

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?

Gives explicit when-not guidance: built-in roots are blocked, and compilation/update activity, dirty scenes, and Play Mode fail closed unless the relevant override is supplied. That maps conditions directly to the allowDirtyScene/allowInPlayMode/waitForSettled flags. It does not name any sibling tool as an alternative, which keeps it short of a 5.

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