Skip to main content
Glama

get_page_info

Extracts details from the current webpage, enabling AI assistants to retrieve essential information through the MCP Browser Server for efficient web automation and data processing.

Instructions

Get information about the current page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler for the 'get_page_info' tool. It checks if a page is available, then retrieves the page title, current URL, and viewport dimensions using Playwright's Page API, and returns a formatted text response with this information.
    case 'get_page_info': { if (!currentPage) { throw new Error('No browser page available. Launch a browser first.'); } const title = await currentPage.title(); const url = currentPage.url(); const viewport = currentPage.viewportSize(); return { content: [ { type: 'text', text: `Page Info: Title: ${title} URL: ${url} Viewport: ${viewport?.width}x${viewport?.height}` } ] }; }
  • src/index.ts:315-321 (registration)
    Tool registration in the ListTools response, defining the name, description, and input schema (empty object) for 'get_page_info'.
    name: 'get_page_info', description: 'Get information about the current page', inputSchema: { type: 'object', properties: {} } },

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/Wladastic/mcp-browser-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server