Skip to main content
Glama

navigate

Directs a web browser to a specified URL, enabling automated web navigation and interaction for data retrieval and task execution.

Instructions

Navigate to a specified URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL to navigate to

Implementation Reference

  • The core handler function implementing the 'navigate' tool logic: validates URL, adds https:// if needed, calls page.goto(url), and returns success message.
    async function handleNavigate(page: Page, args: any): Promise<CallToolResult> { let { url } = args; if (!url) { return { isError: true, content: [ { type: "text", text: "URL parameter is required for navigation" }, ], }; } if (!url.startsWith("http://") && !url.startsWith("https://")) { url = "https://" + url; } await page.goto(url); return { isError: false, content: [{ type: "text", text: `Navigated to ${url}` }], }; }
  • Input schema for the 'navigate' tool, requiring a 'url' string parameter.
    inputSchema: { type: "object", properties: { url: { type: "string", description: "The URL to navigate to" }, }, required: ["url"], },
  • src/index.ts:456-466 (registration)
    Registration of the 'navigate' tool in the TOOLS array, including name, description, and input schema.
    { name: "navigate", description: "Navigate to a specified URL", inputSchema: { type: "object", properties: { url: { type: "string", description: "The URL to navigate to" }, }, required: ["url"], }, },
  • src/index.ts:916-917 (registration)
    Switch case in the main tool dispatcher (handleToolCall) that invokes the navigate handler.
    case "navigate": result = await handleNavigate(page, args);
  • src/index.ts:1068-1071 (registration)
    MCP server request handler for listing tools, exposing the 'navigate' tool via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: 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/steel-dev/steel-mcp-server'

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