navigate
Directs the browser to load a specified URL for automated web testing and interaction.
Instructions
Navigate to a specific URL in the browser
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>"
},
"name": "navigate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The URL to navigate to |
Implementation Reference
- src/browser.ts:31-36 (handler)The core handler function implementing the 'navigate' tool logic: initializes the browser page and navigates to the given URL using Puppeteer, returning a confirmation message.
async navigate(url: string) { const page = await this.init(); this.consoleLogs = []; // Clear logs on new navigation await page.goto(url, { waitUntil: 'networkidle0' }); return `Navigated to ${url}`; } - src/index.ts:27-36 (schema)Defines the input schema, name, and description for the 'navigate' tool, used for validation and listing.
name: "navigate", description: "Navigate to a specific URL in the browser", inputSchema: { type: "object", properties: { url: { type: "string", description: "The URL to navigate to" }, }, required: ["url"], }, }, - src/index.ts:120-122 (registration)Registers the 'navigate' tool handler in the switch statement of the CallToolRequestSchema, dispatching calls to browserManager.navigate.
case "navigate": result = await browserManager.navigate(String(args?.url)); break;