Skip to main content
Glama

select_option

Choose an option in a native dropdown by visible text, value, or zero-based index; waits for visibility and clicks it so change events fire, adding on multi-select.

Instructions

Select an option in a native dropdown by visible text, value, or zero-based index, and return the resulting selection. Waits for the dropdown to be visible, then clicks the option like a user so change events fire; on a multi-select it adds to the current selection. If nothing matches, the error lists the available options so you can retry. Only for real elements; for custom dropdowns built from other elements, click the trigger and then the option.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoElement ref from capture_page (e.g. 'e12') pointing at the <select>. Use instead of selector.
textNoVisible text of the option to select, matched exactly after trimming (e.g. 'Canada'). Provide exactly one of text, value, or index.
indexNoZero-based position of the option, counting every <option> including placeholders like 'Choose...'. Provide exactly one of text, value, or index.
valueNoThe option's value attribute (e.g. 'ca'). Provide exactly one of text, value, or index.
selectorNoLocator for the <select> element, e.g. { by: 'id', value: 'country' }. Provide either selector or ref.
timeoutMsNoHow long to wait for the dropdown to become visible, in milliseconds (default 10000).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.0

TDQS

A4.5/5.0
Behavior4/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 well: it discloses the wait-for-visible behavior, that it clicks like a user so change events fire, that multi-select adds to the existing selection, that mismatches error out with the available option list, and that it returns the resulting selection. It does not discuss timeout expiry behavior or read-only vs mutating implications in any depth, which is the only remaining gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then behavior (wait, click semantics, multi-select, errors), then the exclusion. Four clauses, each carrying distinct information with no repetition or filler.

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

Completeness5/5

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

No output schema and no annotations, so the description must cover behavior and returns — it states the return value (resulting selection) and the error format. Combined with a fully documented 6-parameter schema, an agent has everything needed to invoke it correctly.

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 100%, so every parameter (ref, text, value, index, selector, timeoutMs) is already fully documented including the exactly-one-of constraint and zero-based indexing. The description echoes the three selection modes ('visible text, value, or zero-based index') but adds no format or syntax detail beyond the schema, so the baseline 3 applies.

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 (select) and resource (option in a native <select> dropdown) with a precise scope, and explicitly carves itself apart from the sibling 'click' path for custom dropdowns. An agent can distinguish it from click/interact 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 Guidelines5/5

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

Gives an explicit exclusion and the alternative: 'Only for real <select> elements; for custom dropdowns built from other elements, click the trigger and then the option.' It also states the pre-condition (waits for the dropdown to be visible) and the failure/retry path (error lists available options).

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