get_title
Retrieves the title of the current web page during browser automation sessions, enabling accurate page identification and navigation tracking.
Instructions
Get the current page title
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_title"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- tools-playwright.js:201-213 (registration)Registration of the 'get_title' MCP tool, including name, description, empty input schema, and inline handler that calls browser.getTitle() and returns formatted response.
{ name: 'get_title', description: 'Get the current page title', inputSchema: { type: 'object', properties: {}, required: [] }, handler: async () => { const title = await browser.getTitle(); return { success: true, data: { title }, message: `Page title: ${title}` }; } }, - tools-playwright.js:209-212 (handler)The specific handler function executing the tool logic for 'get_title'.
handler: async () => { const title = await browser.getTitle(); return { success: true, data: { title }, message: `Page title: ${title}` }; } - tools-playwright.js:204-208 (schema)Input schema definition for 'get_title' tool (no required parameters).
inputSchema: { type: 'object', properties: {}, required: [] }, - browser.js:116-119 (helper)Supporting helper method in SimpleBrowser class that launches browser if needed and retrieves the current page title using Playwright's page.title().
async getTitle() { await this.ensureLaunched(); return await this.page.title(); }