Skip to main content
Glama

app_run_ui_command

Invoke an EasyEDA menu command and answer the modal dialogs it opens in one call, enabling scripted UI actions without a separate watcher process.

Instructions

Invoke a menu command AND answer the dialogs it raises.

The composite, and usually the one to reach for. Firing a menu command that opens a modal blocks Altium's scripting engine, so the two halves cannot be separate bridge calls: the second would never be answered. Both halves here are Win32, so they run in one call and the modal is no obstacle.

Doing this by hand meant arming a watcher process before firing the command, which is not something a caller should have to assemble.

THE GATES ARE THE DIALOG DRIVER'S. allow_confirm defaults ON because a command invoked deliberately usually needs its "yes, go ahead" answered, while allow_commit defaults OFF, so a change order is presented rather than executed. dry_run defaults OFF here, unlike app_drive_dialogs: naming a command to run and having nothing happen is not what the caller asked for.

Args: menu_path: pipe-separated, for example "Tools|Annotation|Force Annotate All Schematics...". Discover paths with app_click_menu(list_only=True). allow_commit: permit a design-changing press. allow_confirm: permit answering confirmations. dry_run: invoke the command but press nothing. may_steal_focus: opening a menu needs real input. wait_first: seconds to wait for the first dialog. budget: seconds before giving up. expect_dialog: part of the title of the dialog the command should open. When a different dialog (or none) appears, the reply fails at the menu stage and nothing is driven.

Returns: ok, the menu result, and the full dialogs record. ok is true only when the menu click AND the drive both succeeded, so a command that opened something nobody could answer does not read as a success.

Input Schema

NameRequiredDescriptionDefault
budgetNo
dry_runNo
menu_pathYes
wait_firstNo
allow_commitNo
allow_confirmNo
expect_dialogNo
may_steal_focusNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does: it discloses that firing a modal-opening command blocks Altium's scripting engine, why it cannot be split into two bridge calls, that allow_commit defaults OFF so changes are presented rather than executed, that focus may be stolen, and that a mismatched dialog causes failure at the menu stage.

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

Conciseness4/5

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

Front-loaded with the purpose and the key routing advice, and the Args/Returns structure is scannable. The third paragraph ('Doing this by hand meant arming a watcher process...') largely restates the split-call point already made, so a sentence or two could be cut.

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 eight-parameter, mutating, focus-stealing UI composite with no annotations, the description covers invocation, gating defaults, failure semantics, and the AND-combination of the ok flag. An output schema exists, so the Returns section is supplementary rather than a gap-filler.

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 coverage is 0%, so the description must compensate, and it documents all eight parameters in Args — including units (seconds for wait_first and budget), the pipe-separated menu path with a worked example, a discovery pointer (app_click_menu with list_only=True), and the safety default for allow_commit and allow_confirm.

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 opening line states a specific verb+resource: invoke a menu command AND answer the dialogs it raises. It immediately positions itself relative to siblings as 'the composite, and usually the one to reach for', and the blocking rationale explains why it exists alongside app_click_menu / app_drive_dialogs.

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?

It gives a clear default recommendation ('usually the one to reach for'), explains the modal-blocking condition that forces the composite, and contrasts its dry_run default with app_drive_dialogs. It stops short of an explicit 'when not to use this' (e.g. use app_click_menu when no dialog is expected), leaving that to be inferred from expect_dialog.

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

Deploy Server

Other Tools