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' }], }; });

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