Skip to main content
Glama

go_forward

Navigate forward in browser history to return to previously visited pages, with options to control timing and specify tabs.

Instructions

Navigate forward 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 and inline registration for the 'go_forward' MCP tool. Retrieves the target page, executes page.goForward() with configurable waitUntil and timeout options, handles success by returning current URL, title, and navigation status, or appropriate errors.
    'go_forward', 'Navigate forward in browser history', goForwardSchema.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.goForward({ 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 input schema definition for the go_forward tool, defining optional waitUntil, timeout, and tabId parameters.
    export const goForwardSchema = z.object({ waitUntil: waitUntilSchema, timeout: timeoutSchema, tabId: tabIdSchema, });
  • TypeScript type alias for go_forward input, inferred from goForwardSchema.
    export type GoForwardInput = z.infer<typeof goForwardSchema>;

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