Skip to main content
Glama
lxman

Safari MCP Server

by lxman

safari_navigate

Navigate Safari browser to a specified URL for browser automation and web interaction tasks.

Instructions

Navigate to a URL in Safari

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesSession identifier
urlYesURL to navigate to

Implementation Reference

  • The main handler function for the 'safari_navigate' tool. It extracts sessionId and url from input arguments, delegates navigation to SafariDriverManager, and returns a success message.
    private async navigate(args: Record<string, any>): Promise<Array<{ type: string; text: string }>> {
      const { sessionId, url } = args;
      
      await this.driverManager.navigateToUrl(sessionId, url);
      
      return [
        {
          type: 'text',
          text: `Successfully navigated to: ${url}`
        }
      ];
    }
  • Input schema definition and tool description for 'safari_navigate', used in the listTools response for registration.
      name: 'safari_navigate',
      description: 'Navigate to a URL in Safari',
      inputSchema: {
        type: 'object',
        properties: {
          sessionId: { type: 'string', description: 'Session identifier' },
          url: { type: 'string', description: 'URL to navigate to' }
        },
        required: ['sessionId', 'url']
      }
    },
  • Dispatch case in the handleToolCall switch statement that routes 'safari_navigate' calls to the navigate handler.
    case 'safari_navigate':
      return await this.navigate(args);
  • Underlying helper method in SafariDriverManager that performs the actual navigation using Selenium WebDriver's driver.get(url).
    async navigateToUrl(sessionId: string, url: string): Promise<void> {
      const session = this.getSession(sessionId);
      if (!session) {
        throw new Error(`Session ${sessionId} not found`);
      }
    
      try {
        await session.driver.get(url);
      } catch (error: unknown) {
        const errorMessage = error instanceof Error ? error.message : String(error);
        throw new Error(`Navigation failed: ${errorMessage}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden for behavioral disclosure. It states what the tool does but lacks critical details: whether navigation blocks until page load, handles errors (e.g., invalid URLs), requires specific permissions, or has side effects (e.g., clearing logs). For a navigation tool with zero annotation coverage, this is a significant gap in transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that states the core functionality without unnecessary words. It's front-loaded with the main action and resource, making it easy to parse. Every word earns its place, achieving maximum clarity with minimal verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of browser navigation (which can involve loading states, errors, and session dependencies), the description is incomplete. With no annotations, no output schema, and minimal behavioral context, it fails to provide enough information for reliable use. The agent lacks guidance on what happens after navigation or how to handle failures.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with both parameters ('sessionId' and 'url') clearly documented in the schema. The description doesn't add any meaning beyond what the schema provides—it mentions 'URL' but not 'sessionId', and offers no additional context about parameter usage, formats, or constraints. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Navigate to') and resource ('a URL in Safari'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'safari_start_session' or 'safari_execute_script', but the verb 'navigate' is specific enough to distinguish it as a browser navigation operation rather than session management or script execution.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an active session via 'safari_start_session'), nor does it clarify when navigation is appropriate versus other browser interactions like taking screenshots or inspecting elements. The agent must infer usage from context alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/lxman/safari-mcp-server'

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