Skip to main content
Glama
nzjami

Playwright MCP

by nzjami

browser_navigate_back

Destructive

Navigate back to the previous page in the browser during automation workflows. Use this tool to return to prior web pages when testing or interacting with websites programmatically.

Instructions

Go back to the previous page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler function that performs the browser back navigation by calling `tab.page.goBack()`, includes a snapshot in the response, and adds corresponding Playwright code snippets.
    handle: async (tab, params, response) => {
      await tab.page.goBack();
      response.setIncludeSnapshot();
      response.addCode(`// Navigate back`);
      response.addCode(`await page.goBack();`);
    },
  • Zod schema definition for the tool, specifying name, title, description, empty inputs (no parameters), and readOnly type.
    schema: {
      name: 'browser_navigate_back',
      title: 'Go back',
      description: 'Go back to the previous page',
      inputSchema: z.object({}),
      type: 'readOnly',
    },
  • src/tools.ts:44-44 (registration)
    Registers the browser_navigate_back tool by spreading the exports from navigate.ts into the central allTools array used by the system.
    ...navigate,
  • Exports the defined goBack tool (browser_navigate_back) as part of the module's default export array for inclusion in the tools registry.
    goBack,
Behavior3/5

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

Annotations already indicate destructiveHint=true (implying it changes browser state) and readOnlyHint=false (confirming it's not read-only), which the description doesn't contradict. The description adds minimal behavioral context beyond this, such as not specifying if it waits for page load or handles errors like no history, but doesn't provide misleading information.

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 a single, efficient sentence that directly states the tool's purpose without any fluff. It's front-loaded and wastes no words, making it easy to understand at a glance.

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

Completeness3/5

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

Given the tool's low complexity (0 parameters, no output schema) and annotations covering key behavioral traits (destructive, not read-only), the description is adequate but lacks completeness. It doesn't address potential nuances like error conditions (e.g., no previous page) or integration with browser state, which could be helpful for an agent.

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

Parameters4/5

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

With 0 parameters and 100% schema description coverage, the baseline is 4 as there are no parameters to document. The description doesn't need to compensate for any parameter gaps, and it appropriately avoids unnecessary parameter details.

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 clearly states the action ('Go back') and target ('to the previous page'), providing a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'browser_navigate' (which goes to a specific URL) or 'browser_tabs' (which might involve tab navigation), leaving room for improvement in sibling distinction.

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. It doesn't mention prerequisites (e.g., needing a browser session with history), exclusions (e.g., not usable on the first page), or comparisons to siblings like 'browser_navigate' for forward navigation or 'browser_tabs' for tab switching, offering minimal usage context.

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/nzjami/mcpPlaywright'

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