Skip to main content
Glama

select_option

Selects an option in a combo box or list by visible text and verifies the value changed, using fallback input when direct selection fails.

Instructions

Select an option in a combo box or list by its visible text.

Tries the a11y item list, then SetValue on the control, then a keystroke fallback (real click to focus, type the item text, Return). Each strategy is verified by reading the value back; a strategy that leaves the control showing something else counts as a failure, so ok=false means it really did not change. The keystroke fallback needs the window on top.

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": {
      "handle_id": "<handle_id>",
      "value": "<value>"
    },
    "name": "select_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
valueYes
handle_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the whole burden and does so well: it enumerates the three strategy attempts in order, explains each is verified by reading the value back, and defines ok=false as genuine failure to change the control. What's missing is any note on side effects, timing, or permissions the automation requires.

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 opening sentence front-loads the core action, and the fallback chain reads as a compact ordered narrative. The verification sentence is slightly dense but every clause carries behavioral information an agent needs.

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 two-parameter tool with no output schema, the definition covers failure semantics (ok=false) and the focusing requirement for the keystroke path. The main gap is how an agent obtains a valid handle_id and what a successful return looks like beyond ok=true.

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 description coverage is 0%, so the description must compensate. "By its visible text" usefully pins down that value is the item's displayed label rather than an index or key, but handle_id is never explained — an agent gets no hint that it is a control handle obtained from find_elements, get_tree, or list_windows.

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?

"Select an option in a combo box or list by its visible text" gives a specific verb, target control type, and selection mechanism, which clearly separates it from generic clicks or typing. It stops short of naming a sibling it replaces, but the resource is unambiguous.

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 description implies the right context (combo boxes and lists, selected by visible text) and warns that the keystroke fallback needs the window on top, which is actionable pre-condition guidance. It never states when to prefer click, type_text, or press_key instead, and gives no exclusions, so usage is implied rather than directed.

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