puppeteer_navigate
Direct a real browser to a specified URL on a Linux display server, enabling web interaction, screenshots, and JavaScript execution for browser automation tasks.
Instructions
Navigate to a URL
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes |
Implementation Reference
- index.ts:216-224 (handler)Handler implementation for the 'puppeteer_navigate' tool. Navigates the Puppeteer-controlled page to the specified URL and returns a confirmation message.case "puppeteer_navigate": await page.goto(args.url); return { content: [{ type: "text", text: `Navigated to ${args.url}`, }], isError: false, };
- index.ts:106-112 (schema)Input schema definition for the 'puppeteer_navigate' tool, specifying an object with a required 'url' string property.inputSchema: { type: "object", properties: { url: { type: "string" }, }, required: ["url"], },
- index.ts:103-113 (registration)Registration of the 'puppeteer_navigate' tool in the TOOLS array, including name, description, and schema.{ name: "puppeteer_navigate", description: "Navigate to a URL", inputSchema: { type: "object", properties: { url: { type: "string" }, }, required: ["url"], }, },
- index.ts:448-449 (registration)Registration via the ListToolsRequestSchema handler that returns the TOOLS array containing puppeteer_navigate.tools: TOOLS, }));
- index.ts:193-211 (helper)Helper function to initialize and ensure the Puppeteer browser and page instance is ready, called before tool execution.async function ensureBrowser() { if (!browser) { browser = await puppeteer.launch({ headless: false, env: processEnvironment // Pass the X11 environment variables }); const pages = await browser.pages(); page = pages[0]; page.on("console", (msg) => { const logEntry = `[${msg.type()}] ${msg.text()}`; consoleLogs.push(logEntry); server.notification({ method: "notifications/resources/updated", params: { uri: "console://logs" }, }); }); } return page; }