Skip to main content
Glama

pilot_select_option

Select dropdown options by value, label, or visible text in browser automation using element references or CSS selectors.

Instructions

Select a dropdown option by value, label, or visible text.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refYesSelect element ref (@e3) or CSS selector
valueYesOption value, label, or text to select

Implementation Reference

  • The implementation of the `pilot_select_option` tool, which uses `BrowserManager` to resolve the target element and Playwright's `selectOption` method to perform the selection.
    server.tool(
      'pilot_select_option',
      'Select a dropdown option by value, label, or visible text.',
      {
        ref: z.string().describe('Select element ref (@e3) or CSS selector'),
        value: z.string().describe('Option value, label, or text to select'),
      },
      async ({ ref, value }) => {
        await bm.ensureBrowser();
        try {
          const resolved = await bm.resolveRef(ref);
          if ('locator' in resolved) {
            await resolved.locator.selectOption(value, { timeout: 5000 });
          } else {
            await bm.getPage().selectOption(resolved.selector, value, { timeout: 5000 });
          }
          bm.resetFailures();
          return { content: [{ type: 'text' as const, text: `Selected "${value}" in ${ref}` }] };
        } catch (err) {
          bm.incrementFailures();
          return { content: [{ type: 'text' as const, text: wrapError(err) }], isError: true };
        }
      }
    );
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 burden of disclosure. It fails to mention critical browser automation behaviors such as whether this triggers 'change' events, waits for the element to be visible/enabled, supports multi-select, or scrolls options into view.

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?

Extremely efficient at 10 words. Front-loaded with the action verb, every word earns its place, and there is no redundancy or unnecessary elaboration.

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

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a two-parameter atomic operation with full schema coverage, but gaps remain regarding the behavioral contract (event firing, waiting semantics, error handling) that would help an agent predict side effects and failure modes.

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?

Schema coverage is 100%, providing clear descriptions for both `ref` (element ref or CSS selector) and `value` (option identifier). The description reinforces the polymorphic nature of the `value` parameter (accepting value, label, or visible text) but does not add syntax details or examples beyond what the schema provides.

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?

Clearly states the specific action (Select) and resource (dropdown option) along with the matching mechanism (value, label, or visible text). However, it does not explicitly differentiate from sibling tools like `pilot_fill` or `pilot_click` that might seem applicable to dropdowns.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool versus alternatives such as `pilot_fill` or `pilot_click`, nor does it mention prerequisites (e.g., needing to locate the element first) or error conditions (e.g., if the option is not found).

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/TacosyHorchata/Pilot'

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