Skip to main content
Glama

browser_delete_cookies

Remove browser cookies to clear session data, reset user states, or prepare for clean web testing scenarios.

Instructions

Delete cookies from the browser

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Inline handler for the 'browser_delete_cookies' tool: retrieves WebDriver instance, creates CookieService, calls deleteAllCookies(), and returns confirmation message.
    server.tool('browser_delete_cookies', 'Delete cookies from the browser', {}, async () => {
      const driver = stateManager.getDriver();
      const cookieService = new CookieService(driver);
      await cookieService.deleteAllCookies();
      return {
        content: [{ type: 'text', text: 'Deleted all cookies' }],
      };
    });
  • Helper method in CookieService that deletes all cookies using Selenium WebDriver's manage().deleteAllCookies().
    async deleteAllCookies(): Promise<void> {
      await this.driver.manage().deleteAllCookies();
    }
  • Registers the 'browser_delete_cookies' tool on the MCP server with no input parameters and the inline handler.
    server.tool('browser_delete_cookies', 'Delete cookies from the browser', {}, async () => {
      const driver = stateManager.getDriver();
      const cookieService = new CookieService(driver);
      await cookieService.deleteAllCookies();
      return {
        content: [{ type: 'text', text: 'Deleted all cookies' }],
      };
    });
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action is 'delete,' implying a destructive mutation, but doesn't clarify if this deletes all cookies globally, per domain, or with other scopes. It also omits details like whether it requires specific permissions, confirmation, or has side effects (e.g., logging out users).

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 a single, direct sentence with no wasted words, making it easy to parse. It's front-loaded with the core action and resource, though it could be slightly more specific (e.g., 'Delete all cookies').

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 destructive tool with no annotations and no output schema, the description is insufficient. It doesn't explain the scope of deletion (all cookies vs. filtered), behavioral implications (e.g., session loss), or return values. Given the complexity of browser operations, more context is needed to ensure safe and correct usage.

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?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description doesn't add parameter details, which is appropriate here, but it could hint at implicit scoping (e.g., 'all cookies') to enhance clarity. Baseline is 4 for zero parameters.

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 'Delete cookies from the browser' clearly states the action (delete) and resource (cookies), making the purpose immediately understandable. It distinguishes from siblings like 'browser_delete_cookie' (singular) and 'browser_clear' (broader cleanup). However, it doesn't specify if this deletes all cookies or a subset, leaving some ambiguity.

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_delete_cookie' (for specific cookies) or 'browser_clear' (for broader cleanup). It lacks context about prerequisites, such as needing an open browser session, or exclusions, leaving the agent to infer usage from the name alone.

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/pshivapr/selenium-mcp'

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