Skip to main content
Glama

select_option

Select an option from a dropdown by visible text, value, or index using CSS, XPath, ID, name, tag, class, or link locators.

Instructions

Select an option from a dropdown by visible text, value, or index.

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

Input Schema

NameRequiredDescriptionDefault
byNoStrategycss
by_textNo
timeoutNoSeconds
by_indexNo
by_valueNo
selectorYesLocator value

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.9.3
    • changedInput schema / properties / by / description
      Previous value: -"Locator strategy"New value: +"Strategy"
    • changedInput schema / properties / selector / description
      Previous value: -"CSS selector, XPath, or other locator value"New value: +"Locator value"
    • changedInput schema / properties / timeout / description
      Previous value: -"Wait timeout in seconds"New value: +"Seconds"
  2. First observedv0.3.7

TDQS

B3.1/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full disclosure burden. It says nothing about whether the call waits for the option to appear, what timeout means in practice, whether a change event is fired on the page, or what happens when the text/value/index does not match an option (error vs. silent no-op) — all material for a DOM-mutating action.

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?

A single efficient sentence, front-loaded with the verb and resource, with zero filler. It is lean to the point of under-specification for a 6-parameter tool, which keeps it just below a 5.

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

Completeness2/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 annotations, no output schema, and a 6-parameter schema at 50% description coverage, the one-line description leaves too much unstated: mutual exclusivity of selection parameters, wait/retry semantics, and failure behavior. An agent would have to guess how to compose the call.

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?

The schema documents only 'by' (strategy) and 'timeout' (seconds) at 50% coverage; the description compensates by naming visible text, value, and index, which map onto by_text, by_value, and by_index. However, it never states that these three are mutually exclusive or how precedence is resolved when more than one is supplied, which is the highest-risk ambiguity in a 6-parameter schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb ('Select') and resource ('option from a <select> dropdown'), plus the three selection modes. That clearly separates it from generic siblings like click, type_text, or send_keys, though siblings aren't named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

The phrase 'from a <select> dropdown' implicitly scopes usage to native select elements, which is the key discriminator versus click. But there is no explicit guidance, no exclusion for custom/non-native dropdowns, and no mention of prerequisites such as the element needing to be visible or the option needing to exist.

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