Skip to main content
Glama

escalate_via_click

Restores a failed Lua operation and performs a real simulated click on the UI entry point when assertion escalation flags that command-line actions aren't reaching the true environment.

Instructions

escalate_via_click tool. Write op. Command-line fallback to real input.

When lua_eval command-line operations (e.g. PROJECT_RUNTIME.global.ui:open(uid)) don't carry real data — surfaced by repeated verify_assertions failures under the same goal (verdict.escalation.should_escalate) — the agent should NOT keep forcing the lua path. This tool atomically:

  1. Restores the lua op by running the caller-supplied undo_lua (the inverse operation, e.g. PROJECT_RUNTIME.global.ui:close(uid)).

  2. Re-enters through REAL simulated input by clicking the true entry-point button (delegates to simulate_click).

  3. On a landed click, clears the escalation gate for goal and soft-grounds the lua runway (entering the real environment is a reality-touching act).

If the undo fails, the click is NOT attempted (never stack a click on an un-restored dirty state) and the gate is left intact. If the click misses, the gate is left intact so the agent can retry with a different locator / mode.

PlayMode-only (lua VM + simulate both require Play Mode).

USE WHEN: verify_assertions returned escalation.should_escalate=true — your lua command-line operations are not reaching the real environment. Pass undo_lua to restore your prior lua op and the real entry button's panel_uid + ref_key/path; this tool restores then clicks for real, so the next screenshot/assertion faces the true environment.

DO NOT ask the user before the real click. The fallback (undo -> real click -> reverify) is deterministic and runs entirely inside this tool. Pass assertions (same shape as verify_assertions) describing the real-environment success state; after a landed click the tool re-verifies and returns needs_user:

  • needs_user=false -> the real path worked (or click missed -> retry locator); proceed WITHOUT asking the user.

  • needs_user=true -> the click landed but the real environment STILL doesn't match the goal — THIS is the only time you ask the user.

Omitting assertions keeps the legacy behavior (no reverify; you decide).

Input Schema

NameRequiredDescriptionDefault
goalYes
modeNoraycast
pathNo
ref_keyNo
undo_luaYes
panel_uidYes
assertionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.10.0

TDQS

A4.8/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 load and does so: it discloses atomicity, the PlayMode-only constraint, failure semantics (undo fails means no click and the gate stays intact; a missed click leaves the gate intact for retry), the delegation to simulate_click, and the needs_user return contract. This is exactly the behavioral context an agent needs before invoking a destructive-adjacent write.

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?

The numbered three-step atomic sequence and the needs_user bullet list are well structured and front-load the trigger, but the opening line 'escalate_via_click tool. Write op.' is redundant filler and the overall text is longer than strictly necessary. Most sentences still earn their place, so the density is acceptable rather than wasteful.

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?

An output schema exists, yet the description still explains the needs_user outcome explicitly, which is the one return value an agent must act on. Combined with the PlayMode restriction, failure paths, and the undo→click→reverify pipeline, there is nothing material missing for correct invocation.

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 0%, so the description must compensate; it explains undo_lua as the caller-supplied inverse operation with an example, panel_uid and ref_key/path as the real entry-point locator, assertions as matching verify_assertions' shape, and goal as the key that gates escalation. It doesn't explain mode's default 'raycast' or the accepted values, leaving one param under-documented.

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 gives a specific verb+resource framing — a command-line fallback that atomically undoes a lua op, re-enters through real simulated input, and re-verifies. It explicitly names where it delegates (simulate_click) and what it replaces (lua_eval command-line ops), so an agent can tell it apart from simulate_click or lua_eval without opening either schema.

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

Usage Guidelines5/5

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

There is an explicit USE WHEN tied to a concrete trigger (verify_assertions returning escalation.should_escalate=true), a DO NOT instruction about not asking the user first, and a precise condition for when the user should be involved (needs_user=true). Alternatives and the escalation path are named outright.

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