Skip to main content
Glama

select

Choose an option from dropdown menus on web pages using CSS selectors to automate form interactions during browser automation tasks.

Instructions

Select an option from a dropdown

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYesCSS selector for the select element
valueYesValue to select

Implementation Reference

  • MCP tool definition for 'select', including input schema, description, and handler function that invokes the browser's select method to choose a dropdown option.
    {
      name: 'select',
      description: 'Select an option from a dropdown',
      inputSchema: {
        type: 'object',
        properties: {
          selector: { type: 'string', description: 'CSS selector for the select element' },
          value: { type: 'string', description: 'Value to select' }
        },
        required: ['selector', 'value']
      },
      handler: async ({ selector, value }) => {
        await browser.select(selector, value);
        return { success: true, message: `Selected "${value}" in ${selector}` };
      }
    },
  • Input schema defining parameters for the 'select' tool: CSS selector for the dropdown and the value to select.
    inputSchema: {
      type: 'object',
      properties: {
        selector: { type: 'string', description: 'CSS selector for the select element' },
        value: { type: 'string', description: 'Value to select' }
      },
      required: ['selector', 'value']
    },
  • Browser wrapper's select method implementation using Playwright's page.selectOption to perform the actual dropdown selection.
    async select(selector, value) {
      await this.ensureLaunched();
      await this.page.selectOption(selector, value);
    }
  • index.js:75-76 (registration)
    Creation of all tools array (including 'select') via createTools, used for MCP server tool listing and execution handling.
    const tools = createTools(browser);
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action without disclosing behavioral traits like whether it waits for page loads, handles dynamic dropdowns, requires the element to be visible, or what happens on failure. This leaves significant gaps for a mutation tool.

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 a single, efficient sentence with zero wasted words. It's front-loaded and appropriately sized for a simple tool, making it easy to parse quickly.

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

Completeness2/5

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

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what happens after selection (e.g., page changes, validation), error conditions, or interaction with other tools, leaving the agent with incomplete context.

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 description coverage is 100%, so the schema already documents both parameters ('selector' and 'value') adequately. The description adds no additional parameter semantics beyond what's in the schema, meeting the baseline for high coverage.

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?

The description clearly states the action ('select an option') and target ('from a dropdown'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'click' or 'fill_form' that might also interact with form elements, missing full sibling distinction.

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?

No guidance is provided on when to use this tool versus alternatives like 'click' for buttons or 'fill_form' for other form inputs. The description only states what it does, not when it's appropriate or what prerequisites might exist.

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/zypin-testing/zypin-mcp'

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