Skip to main content
Glama

select_option

Choose an option from a native HTML dropdown by value or visible text; for custom div-based dropdowns, use the two-click pattern instead.

Instructions

Select an option from a NATIVE dropdown by value or visible text. NATIVE-ONLY: this tool only works on real elements -- it has no effect on custom (div-based) dropdowns like react-select, Material-UI Select, Headless UI Listbox, or any non- picker. For CUSTOM DROPDOWNS, use the two-click pattern instead: (1) click the dropdown control to open the listbox, (2) click the desired option element. Example: react-select on react-select.com -- click e5 to open, then click e23 on the "Green" option. If select_option returns no error but the dropdown value does not change, you are on a custom dropdown -- switch to the two-click pattern. Returns the selected value. Related: get_dom_snapshot (find select element selectors), click (the correct tool for custom non-native dropdowns). Multi-agent: agent-scoped tabs; cross-agent reject with TAB_NOT_OWNED; cap configurable (default 8, 1-64). Pass tab_id only when this agent owns multiple tabs; auto-resolves otherwise. RETURNS change_report: when this tool runs, the response includes a change_report field with a compact diff of what the action mutated (URL, dialogs_opened, nodes_added, nodes_removed, attrs_changed, inputs_changed, focus_shift). Use this to learn the consequence without calling read_page next. If the report exceeds the size cap, change_report.truncated:true and change_report_hint are set; call read_page for the full state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
valueYesOption value attribute or visible text (e.g., "US", "Large", "Option 3")
clientYesAllowlisted client label. Validated against the shared v0.9.36 server/extension allowlist (see mcp/src/tools/visual-session.ts -- MCP_VISUAL_CLIENT_LABELS). Required.
tab_idNoOptional. Tab id this action targets. Omit when the calling agent owns exactly one tab; pass to disambiguate when the agent owns multiple. Single-tab agents and legacy popup/sidepanel/autopilot do not need to pass this.
is_finalNoWhen true, the visual session clears immediately after this tool resolves. Optional (default false).
selectorYesCSS selector or element ref for the <select> dropdown (e.g., "#country", "select[name=size]", or "e8")
visual_reasonYesShort human-readable reason shown in the overlay (for example, "Logging in to GitHub"). Required.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/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: it discloses the native-only no-op behavior on custom dropdowns, the return value, the change_report contents (URL, dialogs_opened, nodes_added/removed, attrs_changed, inputs_changed, focus_shift, truncation flag), and multi-agent tab ownership semantics (TAB_NOT_OWNED, cap default 8/1-64). This is unusually rich behavioral context.

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 purpose and the NATIVE-ONLY constraint before the fallback pattern, example, and return/agent details. It is long but nearly every sentence carries actionable info; the workspace/server-path reference in the `client` schema is the only mildly noisy element, and that lives in the schema, not the prose.

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?

For a mutation tool with no output schema and no annotations, everything an agent needs is present: selection semantics, native vs custom routing, silent-failure detection, tab scoping, and the change_report return contract including truncation handling. Nothing material is missing.

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 schema already documents all six params (baseline 3). The description still adds meaning: it clarifies `value` accepts value attribute or visible text, and gives concrete `tab_id` routing guidance ('pass only when this agent owns multiple tabs; auto-resolves otherwise').

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 (an option from a NATIVE <select> dropdown) by value or visible text. It explicitly delimits scope against custom dropdowns and names the sibling tool (`click`) used for them, so an agent can tell exactly what this does and does not cover.

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?

Uses explicit when/when-not guidance: NATIVE-ONLY, with the two-click `click` pattern spelled out for react-select, Material-UI, Headless UI and other div-based pickers. It even supplies a silent-failure heuristic ('returns no error but value does not change -> switch patterns') and lists related tools (get_dom_snapshot, click).

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