Skip to main content
Glama

Choose option in browser

browser_select_option
DestructiveIdempotent

Select an option in a native browser dropdown by snapshot index and value or visible label, updating the page with input and change events instead of clicking Chrome's dropdown.

Instructions

Choose an option of a native select (dropdown) in one of the agent's tabs, by the select's browser_snapshot index and the option's value or visible label, the way a person's choice in Chrome's dropdown lands: the selection changes and the page gets its input and change events. Chrome draws a select's dropdown outside the page, where browser_snapshot and browser_click cannot reach it, so use this instead of clicking. A label matches whole, ignoring case when nothing matches exactly. Several values choose several options of a select that allows multiple. Nothing is chosen when an option is missing or disabled, and the reply lists the options. Snapshots show each select's current choice. Works in a background tab without selecting it or raising its window. For a custom dropdown built from other elements, open it with browser_click and click its option.

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": {
      "tab_id": "<tab_id>",
      "index": "<index>",
      "values": "<values>"
    },
    "name": "browser_select_option"
  }
}

Input Schema

NameRequiredDescriptionDefault
indexYesElement index of the select from the latest browser_snapshot of this tab.
tab_idYestab_id of one of the agent's tabs, from browser_open_tab or browser_list_tabs
valuesYesOption values or visible labels to choose. One for an ordinary select; several only for a select that allows multiple, which then holds exactly these.
session_idNoStable task or thread ID. Pass the same value on every browser call for this task. Different IDs isolate tabs and cleanup within one MCP process. Omit for the default process session.
return_stateNoAppend a current snapshot and readiness status after acting. Without wait_for_selector, only a short pause and bounded navigation wait are used; SPA readiness is not guaranteed. Snapshot indices replace earlier ones. A timeout does not mean the action failed: re-observe with browser_snapshot before repeating it.
wait_timeout_msNoBound for wait_for_selector in milliseconds (default 8000, maximum 10000; 0 checks once). Requires wait_for_selector. Timeout preserves action success and returns current state. Use browser_snapshot with the same wait to re-observe without repeating an action.
wait_for_selectorNoWait for any visible element matching this CSS selector in the page or any of its frames (iframes), including open shadow roots (web components); a timeout says how many frames could not be searched. On actions requires return_state=true. Returns readiness met, timeout or error; only this condition is checked, not general app readiness. Prefer a selector specific to the expected new UI.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.14.0

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations it discloses concrete behavior: the selection changes and fires input/change events, nothing is chosen when an option is missing or disabled and the reply lists the options, and it works in a background tab without raising a window. It also clarifies the destructive aspect implicit in destructiveHint by noting a multi-select 'then holds exactly these', i.e. prior selections are replaced, consistent with idempotentHint=true.

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 and addressing scheme, then escalates to alternatives and edge cases. It is a single dense paragraph of six sentences; nearly all earn their place, though the label-matching and multi-select rules could be tightened slightly.

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 7-parameter mutation tool with no output schema, it covers the main failure modes (missing/disabled option, reply contents), tab backgrounding, and the custom-dropdown escape hatch. It does not discuss error responses or the snapshot-index invalidation caveat described in return_state, which is a small residual gap.

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, but the description adds real meaning for the values parameter: whole-label matching that ignores case only when nothing matches exactly, and multiple values only applying to multi-selects. The session/return_state/wait parameters are left entirely to the schema, which documents them well.

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 names a precise verb and resource (choose an option of a native select dropdown) plus the addressing scheme (select's browser_snapshot index plus option value or label). It explicitly distinguishes itself from browser_click by explaining that Chrome draws the dropdown outside the page where snapshot/click cannot reach it.

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?

It states when to use this tool instead of clicking, and gives the counter-case: for custom dropdowns built from non-native elements, open with browser_click and click the option. The whole path for both native and custom dropdowns is covered with no inference required.

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