Skip to main content
Glama

select_option

Selects an option from a native HTML dropdown using a CSS selector, matching by text, value, or index. Use for standard elements only.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.2.0
  2. Removedv1.0.2
  3. First observedv0.1.1

TDQS

A4.7/5.0
Behavior4/5

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

The description discloses that an error is raised when the dropdown or requested option cannot be found. It does not mention potential side effects like triggering change events, but this is a minor omission given the straightforward nature of the action.

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 concise, well-organized, and every sentence adds useful information. No redundant or vague phrasing.

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?

The description covers all necessary usage context, parameter semantics, and error behavior. It does not describe a return value, but the tool's output is likely not a primary concern for a selection action.

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?

Although the schema lacks descriptions, the tool description fully explains every parameter: dropdown_selector, value, and by, including the meaning of each enum value for 'by' and acceptable types for 'value'.

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's purpose: selecting an option from an HTML <select> dropdown. It also distinguishes itself from other element-interaction tools by explicitly limiting its use to native <select> elements.

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 to use this tool (native <select> elements) and when not to use it, directing users to click or other element-interaction tools for custom JavaScript dropdowns.

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