Skip to main content
Glama

browser_title

Retrieve the current web page title during browser automation to verify page loading or extract page information.

Instructions

Get the current page title

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The inline handler function for the 'browser_title' tool. It retrieves the current browser driver from the state manager, fetches the page title using driver.getTitle(), and returns it in the MCP response format, with 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}`, }, ], }; } });
  • Registration of the 'browser_title' tool using server.tool, with no input schema ({}), description 'Get the current page title', and inline handler.
    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}`, }, ], }; } });

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