Skip to main content
Glama

browser_element_is_enabled

Check if a web element is enabled for interaction using Selenium WebDriver. Specify locator strategy and value to verify element state for automation testing.

Instructions

Checks if an element is enabled

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

  • Handler and registration for 'browser_element_is_enabled' tool. Instantiates ElementService and calls isElementEnabled method.
    server.tool(
      'browser_element_is_enabled',
      'Checks if an element is enabled',
      { ...locatorSchema },
      async ({ by, value, timeout = 15000 }) => {
        try {
          const driver = stateManager.getDriver();
          const elementService = new ElementService(driver);
          const isEnabled = await elementService.isElementEnabled({
            by,
            value,
            timeout,
          });
          return {
            content: [{ type: 'text', text: `Element is enabled: ${isEnabled}` }],
          };
        } catch (e) {
          return {
            content: [
              {
                type: 'text',
                text: `Error checking element enabled status: ${(e as Error).message}`,
              },
            ],
          };
        }
      }
    );
  • ElementService.isElementEnabled: Finds the element using locator and returns WebElement.isEnabled() from Selenium, false on error.
    async isElementEnabled(params: LocatorParams): Promise<boolean> {
      try {
        const element = await this.findElement(params);
        return element.isEnabled();
      } catch {
        return false;
      }
    }
  • Shared input schema for element locator tools: 'by' strategy, 'value', optional 'timeout'.
    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'),
    };
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Checks if an element is enabled' implies a read-only operation but doesn't specify what 'enabled' means in practice (interactable vs. visible), whether it waits for the element to become enabled, what happens if the element doesn't exist, or what the return value looks like. For a tool with no annotation coverage, this is insufficient behavioral context.

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 maximally concise at just four words: 'Checks if an element is enabled'. Every word earns its place, with no wasted verbiage or unnecessary elaboration. It's front-loaded with the core purpose and doesn't bury important information.

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 tool with no annotations and no output schema, the description is incomplete. It doesn't explain what 'enabled' means in the browser automation context, what the return value is (boolean? string?), error conditions, or how it interacts with the timeout parameter. Given the complexity of browser automation and lack of structured metadata, the description should provide more 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?

The description adds no parameter information beyond what's already in the schema, which has 100% description coverage. All three parameters (by, value, timeout) are well-documented in the schema with descriptions and enum values. The baseline score of 3 is appropriate since the schema does the heavy lifting, though the description could have added context about how these parameters work together.

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 tool's purpose as 'Checks if an element is enabled', which is a specific verb+resource combination. It distinguishes itself from siblings like 'browser_element_is_displayed' and 'browser_element_is_selected' by focusing on the 'enabled' state rather than visibility or selection status. However, it doesn't explicitly mention the web browser context or differentiate from all siblings.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to check enabled status versus displayed status, nor does it provide any context about prerequisites or typical use cases. The agent must infer usage from the tool name alone.

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