Skip to main content
Glama

browser_refresh

Refresh the current web page in the browser to reload content, update dynamic elements, or resolve display issues during automated testing.

Instructions

Refresh the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'browser_refresh' tool. It retrieves the current WebDriver instance from the state manager and calls `navigate().refresh()` to refresh the current page, returning a success or error message.
    server.tool('browser_refresh', 'Refresh the current page', {}, async () => { try { const driver = stateManager.getDriver(); await driver.navigate().refresh(); return { content: [{ type: 'text', text: `Browser refreshed` }], }; } catch (e) { return { content: [ { type: 'text', text: `Error refreshing browser: ${(e as Error).message}`, }, ], }; } });
  • Registration of the 'browser_refresh' tool on the MCP server using `server.tool()`, with no input schema required.
    server.tool('browser_refresh', 'Refresh the current page', {}, async () => { try { const driver = stateManager.getDriver(); await driver.navigate().refresh(); return { content: [{ type: 'text', text: `Browser refreshed` }], }; } catch (e) { return { content: [ { type: 'text', text: `Error refreshing browser: ${(e as Error).message}`, }, ], }; } });
  • src/tools/index.ts:9-9 (registration)
    Call to registerBrowserTools within the registerAllTools function, which registers all browser tools including 'browser_refresh'.
    registerBrowserTools(server, stateManager);

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