Skip to main content
Glama
Lokii0911
by Lokii0911

browser_reset

Reset the Selenium browser session to a clean state, resolving issues caused by stale sessions or accumulated state during automated tests.

Instructions

Restart the Selenium browser session.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core logic of browser_reset: calls stop() then start() on BrowserManager to restart the browser session.
    def reset(self) -> BrowserState:
        with self._lock:
            self.stop()
            return self.start()
  • MCP tool handler for browser_reset; delegates to _run(browser.reset).
    def browser_reset() -> dict[str, Any]:
        """Restart the Selenium browser session."""
        return _run("browser_reset", browser.reset)
  • The @mcp.tool() decorator on line 35 registers the browser_reset function as an MCP tool (the decorator on the preceding function applies to browser_start, but all tool functions in this file are registered via @mcp.tool()).
    @mcp.tool()
  • The _run helper that wraps all tool executions, including browser_reset, with error handling.
    def _run(action: str, func: Any, *args: Any, **kwargs: Any) -> Any:
        try:
            return _as_dict(func(*args, **kwargs))
        except BrowserError:
            logger.exception("Browser action failed: %s", action)
            raise
        except Exception as exc:
            logger.exception("Unexpected Selenium MCP error during %s", action)
            raise BrowserError(f"{action} failed: {exc}") from exc
Behavior2/5

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

No annotations provided; description only says 'restart' without detailing effects on cookies, state, or windows, leaving behavioral ambiguity.

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

Conciseness3/5

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

Extremely concise single sentence, but may be under-specified for a tool that likely has broader implications; balance could be improved.

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?

Despite having zero parameters and an output schema, the description omits key details about session state reset, making it incomplete for an agent to understand full behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters, so baseline 4; description adds meaning over empty schema by clarifying the action is to restart the session.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool restarts the Selenium browser session, which is a specific action distinct from starting, stopping, or other browser 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?

No guidance on when to use this tool versus alternatives like browser_start or browser_stop; lacks context for appropriate usage.

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/Lokii0911/SeleniumMCP'

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