Skip to main content
Glama

navigate

Directs a Tauri desktop application to load a specified URL in a window, enabling automated navigation for testing and interaction workflows.

Instructions

Navigate to URL

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL
windowNoWindow label (default: focused window)

Implementation Reference

  • Tool schema definition for 'navigate' with name, description, and Zod input schema (url and optional window parameters)
    navigate: { name: 'navigate', description: 'Navigate to URL', inputSchema: z.object({ url: z.string().describe('URL'), window: z.string().optional().describe('Window label (default: focused window)'), }), },
  • Tool handler that processes navigate requests by calling socketManager.navigate() and returning the result
    navigate: async (args: { url: string; window?: string }) => { const result = await socketManager.navigate(args.url, args.window); return { content: [ { type: 'text' as const, text: result, }, ], }; },
  • Actual implementation of navigate method in SocketManager that sends 'navigate' command via socket and returns success message
    async navigate(url: string, windowLabel?: string): Promise<string> { const params: Record<string, unknown> = { url }; if (windowLabel) params.window = windowLabel; const result = await this.sendCommand('navigate', params) as { success: boolean; error?: string }; if (!result.success) { throw new Error(result.error || 'Navigate failed'); } const windowInfo = windowLabel ? ` in window '${windowLabel}'` : ''; return `Navigated to ${url}${windowInfo}`; }
  • Navigate tool registered in DEFAULT_ESSENTIAL_TOOLS array, marking it as an essential tool
    const DEFAULT_ESSENTIAL_TOOLS = [ 'app_status', 'launch_app', 'stop_app', 'snapshot', 'click', 'fill', 'screenshot', 'navigate', ];
  • Generic tool call handler registration that routes tool requests (including navigate) to their respective handlers
    this.server.setRequestHandler(CallToolRequestSchema, async (request) => { const { name, arguments: args } = request.params; if (!(name in this.toolHandlers)) { throw new Error(`Unknown tool: ${name}`); } const handler = this.toolHandlers[name as ToolName]; try { return await handler(args as never); } catch (error) { return { content: [ { type: 'text' as const, text: `Error: ${(error as Error).message}`, }, ], isError: true, }; } });

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/DaveDev42/tauri-plugin-mcp'

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