Skip to main content
Glama

Secondary action

perform_secondary_action

Run a named secondary UI action—such as Raise, Expand, Collapse, Press, or Select—on an app element by index, mapped to the UI Automation patterns that element supports.

Instructions

Run a named secondary action on an element (Raise / Expand / Collapse / Press / Select). Maps onto the UIA patterns the element actually supports.

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
appYes
actionYes
element_indexYesElement index from the last get_app_state, as a string

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

The annotation only declares readOnlyHint=false, so the description must carry the rest; it adds the useful fact that actions are dispatched via UIA patterns the element supports, implying per-element capability limits. It does not disclose failure behavior for unsupported patterns, whether Expand/Collapse/Select mutate state persistently, or whether the call blocks until the UI settles.

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?

Two tight sentences with the verb and action set front-loaded and no filler. The second sentence is slightly vague ("the element actually supports") but still earns its place by conveying the capability constraint.

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

Completeness3/5

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

For a 3-required-parameter, non-read-only UI interaction tool with no output schema and thin annotation coverage, the definition covers the core invocation but not outcomes: no indication of what the tool returns, how unsupported actions surface, or whether the action needs a preceding get_app_state. Adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 33% — only element_index is documented (as coming from the last get_app_state). The description partially compensates by listing the valid action names, which the schema lacks as an enum, but leaves `app` (name vs. ID?) and any action-name casing/aliasing rules unexplained.

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?

States a specific verb and resource ("Run a named secondary action on an element") and enumerates the concrete actions (Raise / Expand / Collapse / Press / Select), which tells an agent this is the UIA-pattern path rather than a plain click. It stops short of naming the sibling it complements (browser_click/click), so differentiation is implied by "secondary" rather than explicit.

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

Usage Guidelines3/5

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

The phrase "secondary action" plus the action list implies when to reach for this over a normal click, and "Maps onto the UIA patterns the element actually supports" hints it only works on pattern-capable elements. There is no explicit when-not guidance, no named alternative, and no statement about what to do if the requested pattern is unsupported.

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