Skip to main content
Glama
dragons96

MCP-Undetected-Chromedriver

by dragons96

browser_fill

Fill specified input fields using CSS selectors and values to automate form interactions in Chrome, bypassing anti-bot detection for web automation and testing tasks.

Instructions

fill out an input field

Args:
    selector: CSS selector for input field - required
    value: The value to fill - required

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorYes
valueYes

Implementation Reference

  • The handler function for the 'browser_fill' tool. It validates inputs, ensures the browser is ready, finds the element by CSS selector, fills it with the provided value using send_keys, and returns a success response.
    @mcp.tool()
    async def browser_fill(
            selector: str,
            value: str,
    ):
        """fill out an input field
    
        Args:
            selector: CSS selector for input field - required
            value: The value to fill - required
        """
        assert selector, "Selector is required"
        assert value, "Value is required"
    
        async def fill_handler(driver: uc.Chrome):
            driver.find_element(By.CSS_SELECTOR, selector).send_keys(value)
            return await create_success_response(f"Filled {selector} with: {value}")
    
        return await tool.safe_execute(
            ToolContext(webdriver=await ensure_browser()), fill_handler
        )
  • Registers the browser_fill tool with the MCP server using the @mcp.tool() decorator.
    @mcp.tool()
  • Function signature defining the input schema: selector (str, required), value (str, required). Input validation via assert statements.
    async def browser_fill(
            selector: str,
            value: str,
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the action ('fill out') but does not disclose behavioral traits such as whether it overwrites existing text, handles validation, requires the field to be visible/editable, or any error conditions. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the purpose in the first sentence. The Args section is structured but could be more integrated. It avoids unnecessary verbosity, though the formatting is slightly disjointed, preventing a perfect score.

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 complexity of a browser interaction tool with no annotations, no output schema, and 2 parameters, the description is incomplete. It lacks information on return values, error handling, side effects, and interaction with sibling tools. This makes it inadequate for safe and effective use by 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 0%, so the description must compensate. It adds meaning by explaining that 'selector' is a 'CSS selector for input field' and 'value' is 'The value to fill', which clarifies semantics beyond the schema's generic titles. However, it does not provide examples, format details, or constraints, leaving gaps in parameter understanding.

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: 'fill out an input field' with a specific verb ('fill out') and resource ('input field'). It distinguishes from siblings like browser_click (clicking) or browser_press_key (keyboard input), though not explicitly. However, it lacks explicit sibling differentiation, preventing a perfect score.

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 does not mention when to choose browser_fill over browser_press_key for text input, or prerequisites like needing a focused field. Usage is implied by the purpose but lacks explicit context or exclusions.

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

Related 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/dragons96/mcp-undetected-chromedriver'

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