Skip to main content
Glama

get_pages

List all available browser pages for automation tasks using Playwright MCP server to manage web interactions.

Instructions

List all available browser pages

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler logic for the 'get_pages' tool. It iterates over the global 'pages' dictionary, collects page IDs and URLs, and returns a text content listing all available pages.
    elif name == "get_pages": page_info = [] for page_id, page in pages.items(): page_info.append(f"{page_id}: {page.url}") return [types.TextContent(type="text", text="Available pages:\n" + "\n".join(page_info))]
  • Registration of the 'get_pages' tool in the list_tools() function, including its name, description, and empty input schema (no parameters required).
    types.Tool( name="get_pages", description="List all available browser pages", inputSchema={ "type": "object", "properties": {}, }, ),
  • Global dictionary that stores all open browser pages by ID, directly used in the get_pages handler.
    pages: Dict[str, Page] = {}

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/misanthropic-ai/playwrite-mcp'

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