Skip to main content
Glama

ghost_act

Find a UI element by name or role and click, type, double-click, right-click, or hover in one call, even on covered or hidden windows. Runs in the background, preserving the user's focus and cursor.

Instructions

Find an element and act on it in one call. Target window = window= (anchored) or the session anchor. Under the default background policy the window is NEVER raised and the cursor never moves: click = UIA Invoke or a posted click, type = ValuePattern / WM_SETTEXT with read-back, and the response reports {verified, focus_preserved, cursor_preserved}. Works on covered windows, Chromium/Electron pages and hidden-desktop apps. If a windowless control's own provider activates its window anyway (Chromium does on SetValue), the foreground is handed straight back to the window the human had and the response carries focus_guard. Identify the element by name|role (description needs vision and a screen-facing window). verified=false = dispatched but nothing visibly changed: ghost_see before retrying. background=true is accepted for compatibility; it is already the default behaviour.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modeNo
nameNo
roleNo
textNo
indexNoAct on the nth match (0-based) when several elements share the name/role. Honoured on every route (background, hidden desktop, CDP, foreground); use ghost_find with the same name/index first to see the matches count
actionYesAction to perform
windowNoTitle substring of the window to act in (anchors it). Omit to use the anchor.
backgroundNoCompatibility flag: background dispatch is already the default. Real Win32 controls get posted messages; windowless (WinUI/Chromium/Electron) controls get UIA Invoke/ValuePattern; double_click/right_click/hover need a windowed control. focus_preserved in the response reports the truth.
text_inputNoText to type when action=type (use this to avoid param collision with text-target)
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.23.4

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description fully carries behavioral disclosure. It precisely states that the window is never raised, the cursor never moves, which UIA/Win32 mechanisms are used, what response fields are reported, and how focus_guard behaves when a provider steals foreground. This is exemplary transparency for a mutation tool with no annotation safety hints.

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 description is dense but front-loaded: the purpose is stated first, followed by behavior, caveats, and retry guidance. Every sentence carries technical value, though the length is considerable and the closing compatibility note about 'background=true' slightly repeats information already given earlier.

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

Completeness4/5

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

For a 10-parameter tool with no output schema and no annotations, the description covers a lot: response reporting, visible-change verification, hidden-desktop support, and foreground restoration. It is still missing guidance on the 'mode' parameter and the intended meaning of 'text' versus 'text_input', which an agent would need to select the right arguments confidently.

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?

The description adds meaningful semantics beyond the schema: name|role identification, window anchoring, background default behavior, and the effect of type/click mechanisms. However, the 'mode' parameter's enumerated values (instant/deliberate/instant_only) and the 'text'/'description' parameters remain unexplained despite only 50% schema coverage, so compensation is strong but incomplete.

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+resource: 'Find an element and act on it in one call,' making the combined find-and-act behavior immediately clear. It also distinguishes the tool from siblings like ghost_find and ghost_see by emphasizing the one-call action model and the background/covered-window capability.

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 conveys when to use ghost_act: when the target window may be covered, hidden, or on a Chromium/Electron desktop page. It also gives an explicit fallback instruction: 'verified=false ... ghost_see before retrying.' It does not enumerate exclusions or contrast directly with ghost_tab_* tools, but the context is clear enough for selection.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NORTHTEKDevs/ghost'

If you have feedback or need assistance with the MCP directory API, please join our Discord server