Skip to main content
Glama

perform_secondary_action

Executes a specific accessibility action on a UI element to trigger secondary interactions such as opening context menus or scrolling, and returns the updated accessibility state.

Instructions

Perform an accessibility action exposed by the latest app state. Do not invent action names. A locked-parent Windows agent desktop calls the listed pattern directly without pointer fallback. On macOS, AXShowMenu and AXScrollToVisible are omitted from listings because nearly every element supports them. Returns the updated accessibility state after the action; a separate text-only get_app_state is normally unnecessary. Request a new screenshot before later coordinate input.

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": {
      "app": "<app>",
      "element_index": "<element_index>",
      "action": "<action>"
    },
    "name": "perform_secondary_action"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYesApp name or full app path; macOS bundle ID; macOS and Windows pid:<pid>; Windows process name, window title fragment, or Start-menu shortcut name; Linux desktop entry name, executable name or window title fragment
scopeNomacOS and Windows: element index from the latest returned state. Read only its retained subtree, renumbered from [1], including after actions. If it disappears, return the whole window with a notice. Linux returns INVALID_ARGUMENT.
actionYes
element_indexYesElement index from the latest returned app state

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.0

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true; the description adds real behavioral context beyond that – the locked-parent Windows desktop path with no pointer fallback, the macOS omission of AXShowMenu and AXScrollToVisible from listings, and that it returns updated accessibility state. It still does not state whether an action can be destructive or how failures surface.

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, then constraints, then return behavior, and every sentence carries information. The macOS omission note reads as an inserted aside and the ordering of the closing screenshot instruction is slightly abrupt, but nothing is padding.

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?

With no output schema, the description correctly compensates by describing the returned updated accessibility state. For a stateful mutating tool with open-world actions, the main remaining gap is that possible side effects or failure modes are not characterized.

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 75% and the undocumented parameter is exactly the one the description covers: action must come from the latest returned state and must not be invented. It also explains the platform-specific absence of certain actions, which meaningfully extends what the bare schema conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource: performing an accessibility action exposed by the latest app state, which is more precise than a generic 'act on element'. It does not, however, distinguish itself from close siblings such as run_actions or click, so an agent comparing them gets no routing help.

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 concrete when/when-not guidance: do not invent action names, a separate get_app_state call is normally unnecessary, and a new screenshot must be requested before later coordinate input. It stops short of saying when to prefer this over click, run_actions, or press_key, so it is clear but not fully comparative.

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