Skip to main content
Glama

select_option

Select an option from a native HTML dropdown by visible text, value attribute, or index. Use a CSS selector to target the element and set the chosen value.

Instructions

Select an option from an HTML dropdown.

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 or other element-interaction tools instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byNotext
valueYes
dropdown_selectorYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Install Server

TDQS

A4.8/5.0
Behavior4/5

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

With no annotations provided, the description takes on the burden of explaining behavior. It does this well by describing how matching works for each 'by' mode, noting that numeric-string indices are accepted, and stating that an error is raised when the dropdown or option cannot be found. It could go further by mentioning side effects or state changes, but the core behavioral contract is clearly disclosed.

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 well-organized into an opening sentence, Args section, Raises note, and an explicit usage boundary. Every sentence adds necessary information, and the most important purpose statement is front-loaded.

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?

Given the tool's moderate complexity, the description covers the full set of parameters, matching semantics, error behavior, and the critical native-vs-custom dropdown distinction. An output schema is present, so the description does not need to explain return values, and the provided context is sufficient for an agent to call the tool correctly.

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?

The schema provides no parameter descriptions, so the description fully compensates. It explains dropdown_selector as identifying the select element, value as visible text/value attribute/0-based index depending on 'by', and each 'by' enum value in detail. This goes well beyond what the raw schema conveys.

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 clearly states the action with a specific verb and resource: 'Select an option from an HTML <select> dropdown.' It also distinguishes itself from sibling tools by explicitly limiting its applicability to native select elements, avoiding confusion with click or fill_input.

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?

The description explicitly states when this tool should be used: for native <select> elements. It also provides an alternative for custom JavaScript dropdowns: 'use click or other element-interaction tools instead.' This is clear, actionable guidance for choosing between this tool and its siblings.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/seleniumbase/SeleniumBase'

If you have feedback or need assistance with the MCP directory API, please join our Discord server