Skip to main content
Glama

new_page

Create a new browser page for automation tasks using Playwright MCP server to control web interactions programmatically.

Instructions

Create a new browser page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYes

Implementation Reference

  • Handler for the 'new_page' tool. Validates the provided page_id, creates a new Playwright page using the browser context, stores it in the global pages dictionary, sets it as the current page, and returns a confirmation message.
    elif name == "new_page":
        page_id = arguments.get("page_id")
        if not page_id:
            raise ValueError("Page ID is required")
            
        if page_id in pages:
            raise ValueError(f"Page ID '{page_id}' already exists")
            
        new_page = await context.new_page()
        pages[page_id] = new_page
        current_page_id = page_id
        
        return [types.TextContent(type="text", text=f"Created new page with ID: {page_id}")]
  • Registration of the 'new_page' tool in the list_tools handler, including its schema definition which requires a 'page_id' string.
    types.Tool(
        name="new_page",
        description="Create a new browser page",
        inputSchema={
            "type": "object",
            "properties": {
                "page_id": {"type": "string"},
            },
            "required": ["page_id"],
        },
    ),
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. 'Create a new browser page' implies a write operation but provides no information about permissions needed, whether this opens a blank page or requires initialization, what happens to existing pages, or any rate limits. This is inadequate for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is maximally concise with a single clear sentence that states the core functionality upfront. There's no wasted verbiage or unnecessary elaboration, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutation tool with no annotations, no output schema, and undocumented parameters, the description is insufficient. It doesn't explain what happens after creation, what the 'page_id' parameter means, how this interacts with sibling tools, or any behavioral constraints. The agent would have significant gaps in understanding how to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage for the single required parameter 'page_id', the description provides no information about what this parameter represents, its format, or its purpose. 'Create a new browser page' doesn't mention parameters at all, leaving the agent with no semantic understanding beyond the bare schema structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Create a new browser page' clearly states the action (create) and resource (browser page), making the purpose immediately understandable. However, it doesn't distinguish this tool from its siblings like 'get_pages' or 'navigate', which would require more specific differentiation to earn a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_pages' (listing existing pages), 'navigate' (loading URLs), and 'switch_page' (changing active pages), there's no indication of when creating a new page is appropriate versus using existing ones or what prerequisites might be needed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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