Skip to main content
Glama

select_option

Selects entries in Swing combo boxes, lists, tabs, tables or trees by visible text or index, with Ctrl/Shift multi-select, and waits until the component is ready.

Instructions

Select an entry by visible text (value) or position (index) in a combo box, list, tab pane, table or tree. Table: value is the text of any cell of the row (limit it to a column with col); the cell is selected as by a click. Tree: value is a path like "Root/Child/Leaf" (the root may be left out; " > " also separates); ancestors are expanded on the way, as a user would. Several entries of a list, table or tree: values or indexes (ranges like "2-5"), or a range from value/index to another; they are selected with real clicks, the first plain, the others with Ctrl, a range's end with Shift. add=true keeps the current selection; deselect=true Ctrl-clicks the given entries that are selected. The result lists what is selected afterwards. Waits first (up to timeoutMs) until the component is visible, enabled, editable where needed, and not blocked by a modal dialog or busy overlay, so no wait_for is needed for a component that is about to become usable. Returns the new snapshot.

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

Input Schema

NameRequiredDescriptionDefault
toNoEnd of a range that starts at value (text) or index (number)
addNoKeep the current selection and add to it (Ctrl)
colNoTable column to search in or select
refYes
indexNoPosition; for tables the row, for trees the visible row
valueNo
dialogNoAnswer the modal dialog this action opens with this button (text, or ok/yes/no/cancel); its message is reported. An error if no dialog opens within 3 s
valuesNoSeveral entries by text (table: a cell's text; tree: paths)
indexesNoSeveral positions and ranges, e.g. 0,2,5-8 (table rows, list items, visible tree rows)
deselectNoRemove the given entries from the selection (Ctrl-click the selected ones)
timeoutMsNoHow long to wait for the component to become usable (default 10000)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so: it discloses that selections are performed with real clicks (first plain, others Ctrl, range end Shift), that tree ancestors are expanded 'as a user would,' that the tool waits for visible/enabled/editable/unblocked state up to timeoutMs, and that it returns the new snapshot. These are exactly the execution mechanics an agent cannot infer from the schema.

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?

It is front-loaded with the essential purpose, then organized by widget type and by multi-selection mode, with no filler sentences. It is dense and reads as a few long comma-chained sentences, which slightly hurts scannability for an 11-parameter tool.

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 an 11-parameter, annotation-free tool with no output schema, the description covers widget-specific behavior, selection mechanics, waiting, and return value ('Returns the new snapshot'), which is nearly everything needed to call it correctly. It leaves out failure behavior (entry not found, ambiguous text match) and never mentions the dialog-answer option, which is significant for an action that can open a modal.

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 82%, so the baseline is 3; the description goes beyond it by explaining cross-parameter semantics — value is a table cell limited by col, tree paths use 'Root/Child/Leaf' with optional root and ' > ' separator, indexes accept ranges like '2-5', and `to` closes a range started by value/index. The `dialog` parameter is left to the schema, which is the only notable gap.

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 and resource ('Select an entry ... in a combo box, list, tab pane, table or tree') and immediately details how selection differs per widget type (table rows via cell text, tree paths, multi-selection via values/indexes). An agent can distinguish this from click, select_menu, or read_items without opening the schema.

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?

It gives explicit guidance on when this replaces another tool: 'Waits first (up to timeoutMs) ... so no wait_for is needed for a component that is about to become usable,' which directly names the alternative. It also explains when to use add vs deselect vs plain selection. It stops short of stating when NOT to use it (e.g., plain clicks on non-list elements), so a 4 rather than 5.

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