Skip to main content
Glama
dragons96

MCP-Undetected-Chromedriver

by dragons96

browser_navigate

Directs a Chrome browser to a specified URL using undetected automation, bypassing anti-bot detection mechanisms. Includes an optional timeout parameter for navigation control, ideal for web scraping and testing.

Instructions

Navigate to a URL

Args:
    url: The URL to navigate to - required
    timeout: The timeout for the navigation - optional, default is 30000

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNo
urlYes

Implementation Reference

  • The main handler function for the 'browser_navigate' tool. It uses undetected ChromeDriver to navigate to the specified URL with an optional timeout. Includes input validation, page load timeout setting, and error handling via safe_execute.
    @mcp.tool()
    async def browser_navigate(url: str, timeout: int = 30000):
        """Navigate to a URL
    
        Args:
            url: The URL to navigate to - required
            timeout: The timeout for the navigation - optional, default is 30000
        """
    
        assert url, "URL is required"
    
        async def navigate_handler(driver: uc.Chrome):
            print(f"Navigating to {url}")
            driver.set_page_load_timeout(timeout)
            driver.get(url)
            return await create_success_response(f"Navigated to {url}")
    
        return await tool.safe_execute(
            ToolContext(webdriver=await ensure_browser()), navigate_handler
        )
  • The @mcp.tool() decorator registers the browser_navigate function as an MCP tool.
    @mcp.tool()
  • The docstring provides the tool schema with parameter descriptions and types implied by function signature (url: str required, timeout: int optional default 30000).
    """Navigate to a URL
    
    Args:
        url: The URL to navigate to - required
        timeout: The timeout for the navigation - optional, default is 30000
    """
  • Helper function to ensure the ChromeDriver instance is initialized.
    async def ensure_browser(config: dict | None = None):
        if not Global.webdriver:
            Global.webdriver = uc.Chrome(
                driver_executable_path=ChromeDriverManager().install()
            )
        return Global.webdriver
  • Helper to create successful tool response.
    async def create_success_response(message: str | list[str]) -> types.CallToolResult:
        if isinstance(message, str):
            message = [message]
        return types.CallToolResult(
            content=[TextContent(type="text", text=msg) for msg in message],
            isError=False,
        )
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. While it mentions navigation and timeout, it doesn't explain what 'navigate' entails (e.g., page load, redirect handling, error conditions), what happens on timeout, or any side effects. This leaves significant behavioral gaps for a core browser operation.

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 efficiently structured with a clear purpose statement followed by parameter documentation. Every sentence serves a purpose, and there's no redundant information. The formatting with 'Args:' section enhances readability.

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 browser navigation tool with no annotations and no output schema, the description is incomplete. It doesn't explain what constitutes successful navigation, what happens on errors, what the tool returns, or how it interacts with browser state. Given the complexity of browser operations, more behavioral context is needed.

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 explicitly documents both parameters (url and timeout) with their requirements and default values, which is valuable since schema description coverage is 0%. However, it doesn't add deeper semantic context like URL format validation, timeout unit interpretation, or what constitutes successful navigation.

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 verb 'Navigate' and the resource 'a URL', making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like browser_go_back or browser_go_forward, which are also navigation-related operations.

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 like browser_go_back, browser_go_forward, or other navigation methods. It simply states what the tool does without context about appropriate use cases or prerequisites.

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