Skip to main content
Glama
andytango
by andytango

go_back

Navigate back in browser history to return to the previous page, with options to wait for page load events and set timeout limits.

Instructions

Navigate back in browser history

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
waitUntilNo
timeoutNoTimeout in milliseconds
tabIdNoTab ID to operate on (uses active tab if not specified)

Implementation Reference

  • Handler function that executes the go_back tool: gets the page, calls page.goBack() with options, handles errors, and returns navigation result including URL, title, and whether navigated.
    async ({ waitUntil, timeout, tabId }) => {
      const pageResult = await getPageForOperation(tabId);
      if (!pageResult.success) {
        return handleResult(pageResult);
      }
    
      const page = pageResult.data;
    
      try {
        const response = await page.goBack({
          waitUntil: (waitUntil ?? 'load') as WaitUntilOption,
          timeout: timeout ?? getDefaultTimeout(),
        });
    
        return handleResult(ok({
          url: page.url(),
          title: await page.title(),
          navigated: response !== null,
        }));
      } catch (error) {
        return handleResult(err(normalizeError(error)));
      }
  • Registration of the 'go_back' tool on the MCP server, including name, description, input schema, and handler.
    server.tool(
      'go_back',
      'Navigate back in browser history',
      goBackSchema.shape,
      async ({ waitUntil, timeout, tabId }) => {
        const pageResult = await getPageForOperation(tabId);
        if (!pageResult.success) {
          return handleResult(pageResult);
        }
    
        const page = pageResult.data;
    
        try {
          const response = await page.goBack({
            waitUntil: (waitUntil ?? 'load') as WaitUntilOption,
            timeout: timeout ?? getDefaultTimeout(),
          });
    
          return handleResult(ok({
            url: page.url(),
            title: await page.title(),
            navigated: response !== null,
          }));
        } catch (error) {
          return handleResult(err(normalizeError(error)));
        }
      }
  • Zod schema defining the input parameters for the go_back tool: optional waitUntil, timeout, and tabId.
    export const goBackSchema = z.object({
      waitUntil: waitUntilSchema,
      timeout: timeoutSchema,
      tabId: tabIdSchema,
    });
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While 'Navigate back' implies a navigation action, it doesn't specify what happens on success/failure, whether it waits for page load, or if it requires specific browser state. The description lacks crucial behavioral context beyond the basic action.

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 with zero wasted words. It's front-loaded with the core action and resource, making it immediately understandable. Every word earns its place in conveying the essential function.

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 navigation tool with 3 parameters, no annotations, and no output schema, the description is insufficient. It doesn't address behavioral aspects like error conditions, success indicators, or interaction with browser state. The minimal description leaves too many contextual gaps for effective tool use.

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 67% schema description coverage (2 of 3 parameters documented) and 0 required parameters, the description adds value by implying the core navigation behavior. However, it doesn't explain parameter purposes like 'waitUntil' options or 'tabId' usage, leaving some semantic gaps despite decent schema coverage.

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 clearly states the specific action ('Navigate back') and resource ('browser history'), distinguishing it from sibling tools like 'go_forward' (forward navigation) and 'reload' (page refresh). It uses precise terminology that directly communicates the tool's function.

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 like 'go_forward', 'reload', or 'navigate'. It doesn't mention prerequisites (e.g., requiring browser context or existing history) or typical use cases (e.g., after clicking links).

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/andytango/puppeteer-mcp'

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