Skip to main content
Glama
dragons96

MCP-Undetected-Chromedriver

by dragons96

browser_drag

Drag and drop elements in Chrome using precise selectors, bypassing anti-bot detection for automation and testing on protected websites.

Instructions

Drag an element to another element

Args:
    sourceSelector: The selector for the element to drag - required
    targetSelector: The selector for the target location - required

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceSelectorYes
targetSelectorYes

Implementation Reference

  • The handler function for the 'browser_drag' tool. It is registered via @mcp.tool() decorator. Performs drag-and-drop operation from source element to target element using Selenium's ActionChains.
    @mcp.tool()
    async def browser_drag(
            sourceSelector: str,
            targetSelector: str,
    ):
        """Drag an element to another element
    
        Args:
            sourceSelector: The selector for the element to drag - required
            targetSelector: The selector for the target location - required
        """
        assert sourceSelector, "Source selector is required"
        assert targetSelector, "Target selector is required"
    
        async def drag_handler(driver: uc.Chrome):
            source = driver.find_element(By.CSS_SELECTOR, sourceSelector)
            target = driver.find_element(By.CSS_SELECTOR, targetSelector)
            ActionChains(driver).drag_and_drop(source, target).perform()
            return await create_success_response(
                f"Dragged {sourceSelector} to {targetSelector}"
            )
    
        return await tool.safe_execute(
            ToolContext(webdriver=await ensure_browser()), drag_handler
        )
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. It states the action but doesn't cover critical traits like whether it simulates a mouse drag, handles drag-and-drop events, requires elements to be in a draggable state, or what happens on failure. This leaves significant gaps in understanding the tool's behavior and potential side effects.

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 front-loaded with the core action, followed by a brief parameter list. It avoids unnecessary words, but the parameter descriptions are minimal and could be more informative. The structure is clear, but the content is somewhat sparse, not fully earning its place in terms of depth.

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 drag operation with no annotations and no output schema, the description is incomplete. It doesn't explain return values, error conditions, or interaction details like drag duration or mouse button usage. For a tool that likely involves UI simulation and potential side effects, more context is needed to ensure safe and effective use.

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 basic semantics by naming the parameters and stating they are required, but schema description coverage is 0%, so the schema provides no details. The description doesn't explain what a 'selector' is, provide examples, or clarify format expectations, offering only minimal value beyond the bare parameter names.

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 action ('Drag an element to another element'), specifying both the source and target elements. It distinguishes from siblings like 'browser_click' or 'browser_hover' by focusing on drag-and-drop interactions. However, it doesn't explicitly mention the browser context or differentiate from potential non-browser drag tools, keeping it from 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?

No guidance is provided on when to use this tool versus alternatives like 'browser_click' for simple interactions or 'browser_select' for dropdowns. The description lacks context on prerequisites, such as requiring elements to be visible or draggable, and doesn't mention any exclusions or specific scenarios where this tool is appropriate.

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