Skip to main content
Glama

browser_select_checkbox

Select checkboxes in web browsers using Selenium WebDriver. Specify element locator strategy and value to automate checkbox interactions for testing and automation workflows.

Instructions

Select a checkbox

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
byYesLocator strategy to find element
valueYesValue for the locator strategy
timeoutNoMaximum time to wait for element in milliseconds

Implementation Reference

  • MCP tool registration for 'browser_select_checkbox' including inline handler that delegates to ActionService.selectCheckbox
    server.tool('browser_select_checkbox', 'Select a checkbox', { ...locatorSchema }, async ({ by, value }) => {
      try {
        const driver = stateManager.getDriver();
        const actionService = new ActionService(driver);
        await actionService.selectCheckbox({ by, value });
        return {
          content: [{ type: 'text', text: `Selected checkbox` }],
        };
      } catch (e) {
        return {
          content: [
            {
              type: 'text',
              text: `Error selecting checkbox: ${(e as Error).message}`,
            },
          ],
        };
      }
    });
  • Core implementation logic: locates the checkbox element and clicks it if not already selected
    async selectCheckbox(params: LocatorParams): Promise<void> {
      const locator = LocatorFactory.createLocator(params.by, params.value);
      const checkbox = await this.driver.wait(until.elementLocated(locator), params.timeout || 15000);
      if (!(await checkbox.isSelected())) {
        await checkbox.click();
      }
    }
  • Zod schema defining input parameters (locator strategy, value, optional timeout) for the tool
    export const locatorSchema = {
      by: z
        .enum(['id', 'css', 'xpath', 'name', 'tag', 'class', 'link', 'partialLink'])
        .describe('Locator strategy to find element'),
      value: z.string().describe('Value for the locator strategy'),
      timeout: z.number().optional().describe('Maximum time to wait for element in milliseconds'),
    };
  • Top-level tool registration function that invokes registerActionTools, including browser_select_checkbox
    export function registerAllTools(server: McpServer, stateManager: StateManager): void {
      registerBrowserTools(server, stateManager);
      registerElementTools(server, stateManager);
      registerActionTools(server, stateManager);
      registerCookieTools(server, stateManager);
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. 'Select a checkbox' implies a mutation action but fails to describe what 'select' entails (e.g., checking the box, toggling state), potential side effects, error conditions, or performance characteristics like timeouts. It offers minimal context beyond the basic 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 extremely concise with a single sentence 'Select a checkbox', which is front-loaded and wastes no words. However, this brevity contributes to underspecification rather than efficient communication.

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?

Given the tool's complexity (a mutation action with 3 parameters) and lack of annotations or output schema, the description is incomplete. It does not explain what 'select' means in practice, expected outcomes, error handling, or how it differs from similar tools, leaving significant gaps for an AI agent.

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%, with clear descriptions for 'by' (locator strategy), 'value' (value for locator), and 'timeout' (wait time). The description adds no parameter semantics beyond what the schema provides, so it meets the baseline score of 3 for adequate coverage without extra value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Select a checkbox' is essentially a tautology that restates the tool name 'browser_select_checkbox' with minimal additional meaning. It specifies the verb ('select') and resource ('checkbox'), but lacks any distinction from sibling tools like 'browser_unselect_checkbox' or context about what 'select' means operationally.

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

Usage Guidelines1/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. It does not mention sibling tools like 'browser_unselect_checkbox' for toggling checkboxes or 'browser_click' for general clicking, nor does it specify prerequisites such as needing a checkbox element to be interactable.

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/pshivapr/selenium-mcp'

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