Skip to main content
Glama

Select Option

select_option

Select an option from a native HTML dropdown by visible text, value, or index. Useful for triggering page events after changing the selection.

Instructions

Select an option from an HTML dropdown.

Changing a dropdown selection can trigger additional events on a page.

Args: dropdown_selector: CSS selector identifying the element.

value: The option's visible text, its HTML value attribute, or its
    0-based index, depending on by.

by:
    - "text": Match the option's visible text.
    - "value": Match the option's HTML value attribute.
    - "index": Match the option's 0-based position. Both integer and
      numeric-string values are accepted.

Raises: An error when the dropdown or requested option cannot be found.

This tool is for native elements. For custom JavaScript dropdowns made from div/button/list elements, use click_element or other element-interaction tools instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNotext
valueYes
dropdown_selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.1

TDQS

A5/5.0
Behavior5/5

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

Beyond annotations, the description discloses that changing the selection can trigger additional events and that an error is raised when the dropdown or option is not found. This is consistent with readOnlyHint=false and gives agents useful expectations about side effects and failure modes.

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?

The description is front-loaded with the purpose, followed by a concise event warning, structured Args definitions, an error note, and a sibling-routing note. Every sentence earns its place with no redundant 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?

For a single-action select tool, the description covers the target element type, all parameters and their semantics, error behavior, side-effect warning, and alternative tools. The presence of an output schema means return values do not need explanation, so nothing essential is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates: it defines dropdown_selector as a CSS selector, explains that value can be visible text, value attribute, or 0-based index depending on by, and details each by mode including integer/numeric-string acceptance for index.

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 opens with a specific verb and resource: 'Select an option from an HTML <select> dropdown.' It also differentiates from siblings by explicitly routing custom JavaScript dropdowns to click_element, making the tool's scope unambiguous.

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 explicitly states when to use the tool (native <select> elements) and when not to (custom div/button/list dropdowns), naming click_element and other element-interaction tools as alternatives. The warning about triggering page events adds practical usage context.

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