Skip to main content
Glama

Select a dropdown option

select_option

Selects a dropdown option by ref and value or label, handles native and custom lists, and verifies native selections via read-back.

Instructions

Choose an option in a dropdown identified by ref. Matching, for native and custom lists alike: an exact option value (a custom option's data-value), else an exact visible text, else a substring of the text only when exactly one option contains it; several matches are an error that lists them. Native : selects that option and returns verified:true after read-back. Custom/ARIA dropdowns: opens the control and clicks the matching option (best-effort; for tricky async menus use wait_for + computer click instead); verified is true only when the chosen option itself reports aria-selected or aria-checked, otherwise false (dispatched, not confirmed).

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

Input Schema

NameRequiredDescriptionDefault
refYesDropdown element ref from read_page/find
tabIdYesTarget tab ID (must be in the MCP group)
valueYesOption value or visible label to select
expectNoOptional postcondition: observes the declared UI outcome after one action; failure never repeats input
documentIdNoBind a resolved target to this document; stale documents fail before mutation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.24.1

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses the verification contract (native <select> returns verified:true after read-back; custom/ARIA is best-effort with verified only when the option reports aria-selected/aria-checked, otherwise "dispatched, not confirmed"), and states that multiple matches are an error listing the candidates. That distinguishes a confirmed selection from a fired-but-unconfirmed click, which is exactly the behavioral nuance an agent needs.

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 core action, then branching by control type in a logical order, with no filler sentences. It is dense and semicolon-heavy, so the two verification rules for native vs custom require a careful read, but nothing is redundant.

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?

Covers the hard parts for a 5-parameter, nested-schema tool: matching precedence, ambiguity failure, and what the success signal actually proves. It does not mention the `expect` postcondition or `documentId` binding, though both are documented in the schema, and there is no output schema so the verified flag must be explained here as it is.

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 100%, so the baseline is 3; the description lifts it by spelling out what `value` can mean (a custom option's data-value, visible text, or a unique substring) and how ambiguity is resolved, which the schema's "Option value or visible label" leaves open. The remaining parameters (tabId, expect, documentId) are left entirely to their schema descriptions.

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?

States a specific verb and resource plus the scoping handle: "Choose an option in a dropdown identified by ref." An agent can immediately distinguish this from fill_form/form_input, which fill fields rather than pick from a list of options.

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 an explicit fallback route: "for tricky async menus use wait_for + computer click instead," naming the alternative and the condition that selects it. It also defines the resolution ladder (exact value, then exact text, then unique substring) so the agent knows what to supply. It stops short of saying when not to reach for this tool at all, e.g. non-dropdown widgets.

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