Skip to main content
Glama

reload

Reload the current web page in Puppeteer MCP Server to refresh content, handle dynamic updates, or reset page state for automated browser interactions.

Instructions

Reload the current page

Input Schema

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

Implementation Reference

  • The handler function that executes the reload tool: gets the page, calls page.reload() with options, returns updated URL and title, handles errors.
    async ({ waitUntil, timeout, tabId }) => { const pageResult = await getPageForOperation(tabId); if (!pageResult.success) { return handleResult(pageResult); } const page = pageResult.data; try { await page.reload({ waitUntil: (waitUntil ?? 'load') as WaitUntilOption, timeout: timeout ?? getDefaultTimeout(), }); return handleResult(ok({ url: page.url(), title: await page.title(), })); } catch (error) { return handleResult(err(normalizeError(error))); } }
  • Zod schema defining the input parameters for the reload tool: waitUntil, timeout, tabId.
    export const reloadSchema = z.object({ waitUntil: waitUntilSchema, timeout: timeoutSchema, tabId: tabIdSchema, });
  • Registration of the 'reload' tool on the MCP server using server.tool(), including name, description, schema, and handler.
    server.tool( 'reload', 'Reload the current page', reloadSchema.shape, async ({ waitUntil, timeout, tabId }) => { const pageResult = await getPageForOperation(tabId); if (!pageResult.success) { return handleResult(pageResult); } const page = pageResult.data; try { await page.reload({ waitUntil: (waitUntil ?? 'load') as WaitUntilOption, timeout: timeout ?? getDefaultTimeout(), }); return handleResult(ok({ url: page.url(), title: await page.title(), })); } catch (error) { return handleResult(err(normalizeError(error))); } } );
  • src/server.ts:23-23 (registration)
    Top-level call to registerNavigationTools which includes the reload tool registration.
    registerNavigationTools(server);

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