Skip to main content
Glama

Ui Add To Selection

ui_add_to_selection
Destructive

Use this to add an identified native UI item to the existing selection through Accessibility/UI Automation without clearing other selected items.

Input Schema

NameRequiredDescriptionDefault
idNoElement id returned by ui_snapshot or ui_find. Linux ids are stable per-process accessibility paths and legacy linux:<index> ids remain accepted.
appNoLimit matching to an application/process name substring when available.
pidNoLimit matching to one owning process id when available.
nameNoAccessible name/title substring.
roleNoAccessible role such as Button, Edit, textbox or AXButton.
labelNoCompact numeric label from the most recent ui_snapshot/ui_find; useful for repeated actions without repeating names or coordinates.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
window_titleNoLimit matching to a top-level accessibility window/frame title substring when available.
automation_idNoWindows AutomationId when available.

Output Schema

NameRequiredDescriptionDefault
dataNoAct on UI element structured result for ui_action. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, non-idempotent, and openWorld, so the safety profile is covered elsewhere. The description adds the meaningful behavioral trait that existing selection is preserved, but says nothing about what happens on repeated calls, whether the container must already support multi-select, or what failure looks like.

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?

A single front-loaded sentence with the key semantic (additive, non-clearing) placed at the end where it matters. No wasted clauses, though the mechanism mention ('Accessibility/UI Automation') is somewhat redundant given the tool family.

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?

An output schema exists and annotations carry the risk profile, so the description need not explain returns. Still, for a destructive, non-idempotent multi-select mutation it omits preconditions and sibling disambiguation, leaving real gaps for an agent choosing between ui_add_to_selection and ui_select.

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 100%, so all nine parameters including id, label, and device are documented in the schema itself. The description only echoes that the item must be 'identified' and adds no format, precedence, or matching guidance beyond the schema.

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 (add) and resource (native UI item to the existing selection) and names the underlying mechanism (Accessibility/UI Automation). The phrase 'without clearing other selected items' implicitly distinguishes it from ui_select, though it never names that sibling outright.

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?

'Use this to...' gives an intended context, and the additive qualifier hints at when it beats a plain select. But no alternative is named explicitly (ui_select, computer_add_to_selection) and no precondition is given, such as the element needing to be selectable or already in a multi-select container.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources