Skip to main content
Glama

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,

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