Skip to main content
Glama

browser_title

Retrieve the current webpage title to verify page navigation, confirm page identity, or extract page information during automated browser testing and interaction.

Instructions

Get the current page title

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'browser_title' tool. It retrieves the active browser driver from the StateManager, fetches the current page title using driver.getTitle(), and returns it in the MCP response format. Includes try-catch for error handling.
    server.tool('browser_title', 'Get the current page title', {}, async () => { try { const driver = stateManager.getDriver(); const title = await driver.getTitle(); return { content: [{ type: 'text', text: `Current page title is: ${title}` }], }; } catch (e) { return { content: [ { type: 'text', text: `Error getting page title: ${(e as Error).message}`, }, ], }; } });
  • src/tools/index.ts:9-9 (registration)
    Invocation of registerBrowserTools within the registerAllTools function, which registers the browser_title tool among other browser tools.
    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