Skip to main content
Glama

browser_select

Select an option in a dropdown by value, label, or index. Enables form dropdown selection and validation in browser tests.

Instructions

Select an option in a dropdown by value, label text, or index.

中文详情:

  • 用途:在下拉框(select 元素)中选择指定选项,支持按 value 值、按 label 文本、按索引三种方式

  • 何时使用:表单下拉选项选择时;测试 select 联动效果时;筛选条件选择时;下拉框默认值验证时

  • 输出:{ ok: boolean, selector: string, selectedValue: string, selectedLabel: string, selectedIndex: number, timestamp: string }

  • 参数:

    • selector (string, 必填):select 元素的 CSS 选择器

    • value (string, 可选):要选择的 option 的 value 值

    • label (string, 可选):要选择的 option 的显示文本

    • index (number, 可选):要选择的 option 的索引(从 0 开始)

  • 错误:selector 无匹配或非 select 元素抛出 'Not a select element';value/label/index 都未提供抛出 'No selection criteria provided';选项不存在抛出 'Option not found'

  • 示例:{"selector":"#country","value":"cn"}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexNo要选择的option的索引(从0开始)
labelNo要选择的option的显示文本
valueNo要选择的option的value值
selectorYesselect元素的选择器
Behavior4/5

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

With no annotations, the description carries full burden. It details output fields, error conditions (e.g., 'Not a select element', 'Option not found'), and provides an example. It does not mention side effects like triggering events, but for a selection tool, this is adequate.

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-structured with English summary followed by Chinese details, including sections for purpose, usage, output, parameters, errors, and example. It is front-loaded with the core action and every section adds necessary information without redundancy.

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?

Despite no output schema, the description fully documents the output format and error behavior. Parameters are thoroughly explained, and an example is provided. For a selection tool, this is complete and leaves no ambiguity.

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 baseline is 3. The description adds meaning by explaining that three optional parameters (value, label, index) represent different selection methods and implies exactly one should be used. It also clarifies errors for missing criteria, adding value beyond the schema.

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 tool selects an option in a <select> dropdown by value, label text, or index. The verb 'select' and resource 'dropdown' are specific. It distinguishes from sibling browser tools like browser_click or browser_form_fill by focusing solely on dropdown selection.

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

Usage Guidelines4/5

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

The Chinese section explicitly lists when to use: form dropdown selection, testing select linkage, filter criteria selection, and default value verification. This provides clear context, though it does not mention when not to use or alternative tools such as browser_form_fill.

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

Install Server

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/validpilot/ai-verify-mcp'

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