Skip to main content
Glama

playwright_go_back

Navigate back in browser history during automated testing to verify page transitions and user flow functionality.

Instructions

Navigate back in browser history

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The GoBackTool.execute method implements the core logic for the playwright_go_back tool by calling page.goBack() on the Playwright page instance.
    export class GoBackTool extends BrowserToolBase {
      /**
       * Execute the go back tool
       */
      async execute(_args: any, context: ToolContext): Promise<ToolResponse> {
        return this.safeExecute(context, async (page) => {
          await page.goBack();
          return createSuccessResponse("Navigated back in browser history");
        });
      }
    }
  • Input schema definition for the playwright_go_back tool, specifying no required parameters.
    {
      name: "playwright_go_back",
      description: "Navigate back in browser history",
      inputSchema: {
        type: "object",
        properties: {},
        required: [],
      },
    },
  • Registration in the main tool handler switch statement that dispatches calls to the GoBackTool instance.
    case "playwright_go_back":
      return await goBackTool.execute(args, context);
  • Instantiation of the GoBackTool class instance used for handling tool calls.
    if (!goBackTool) goBackTool = new GoBackTool(server);
  • Import of the GoBackTool from its implementation file.
    import { GoBackTool, GoForwardTool } from "./tools/browser/navigation.js";
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Navigate back') but does not cover critical traits like whether it requires an active browser session, what happens if no history exists, error conditions, or side effects. This leaves significant gaps for a mutation tool in a browser automation context.

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, clear sentence ('Navigate back in browser history') that is front-loaded and wastes no words. It directly conveys the core functionality without redundancy or fluff, making it highly efficient and easy to parse.

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?

Given the tool's complexity (a mutation action in browser automation), lack of annotations, and no output schema, the description is insufficient. It does not address behavioral aspects like session requirements, error handling, or what 'back' entails (e.g., page reloads, state changes). For a tool with potential side effects, more context is needed.

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?

The tool has 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description appropriately omits parameter details, focusing on the tool's purpose. A baseline of 4 is applied as it efficiently handles the lack of parameters without unnecessary elaboration.

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

Purpose5/5

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

The description 'Navigate back in browser history' clearly states the verb ('Navigate back') and resource ('browser history'), making the purpose specific and unambiguous. It distinguishes from siblings like 'playwright_go_forward' by specifying the direction of navigation, avoiding tautology with the tool name.

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, such as 'playwright_navigate' for direct URL navigation or 'playwright_go_forward' for forward navigation. It lacks context about prerequisites (e.g., requiring a browser session) or exclusions, offering only basic functional intent.

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/aakashH242/mcp-playwright'

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