Skip to main content
Glama

get_pages

Retrieve a list of all active browser pages for Playwright automation tasks, enabling efficient browser management and control in MCP workflows.

Instructions

List all available browser pages

Input Schema

NameRequiredDescriptionDefault

No arguments

Input Schema (JSON Schema)

{ "properties": {}, "type": "object" }

Implementation Reference

  • The handler logic for the 'get_pages' tool within the main call_tool dispatcher. It lists all available browser pages by iterating over the global 'pages' dictionary and formatting their IDs and URLs into a text response.
    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 server's list_tools() response. Defines the tool name, description, and input schema (empty object, no parameters required).
    types.Tool( name="get_pages", description="List all available browser pages", inputSchema={ "type": "object", "properties": {}, }, ),
  • Input schema definition for the 'get_pages' tool, specifying an empty object (no required parameters).
    inputSchema={ "type": "object", "properties": {}, },

Other Tools

Related Tools

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