Skip to main content
Glama

browser_get_url

Retrieve the current webpage URL during browser automation to track navigation progress or verify page location.

Instructions

Get the current page URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers and implements the 'browser_get_url' tool. Retrieves the current browser session driver from the StateManager, calls getCurrentUrl() on it, and formats the result as an MCP tool response with error handling.
    server.tool('browser_get_url', 'Get the current page URL', {}, async () => { try { const driver = stateManager.getDriver(); const url = await driver.getCurrentUrl(); return { content: [{ type: 'text', text: `Current page URL is: ${url}` }], }; } catch (e) { return { content: [ { type: 'text', text: `Error getting page URL: ${(e as Error).message}`, }, ], }; } });

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