Skip to main content
Glama

safari_list_sessions

Retrieve all active Safari browser sessions to monitor and manage open tabs and windows for browser automation tasks.

Instructions

List all active Safari sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registration of the 'safari_list_sessions' tool, including its name, description, and input schema (no required parameters).
    { name: 'safari_list_sessions', description: 'List all active Safari sessions', inputSchema: { type: 'object', properties: {} } },
  • The main handler function for 'safari_list_sessions'. Calls driverManager.getAllSessions() and formats the list of active session IDs as a text response.
    private async listSessions(): Promise<Array<{ type: string; text: string }>> { const sessions = this.driverManager.getAllSessions(); return [ { type: 'text', text: `Active Safari Sessions (${sessions.length}):\n${sessions.join('\n')}` } ]; }
  • Supporting helper method in SafariDriverManager that returns all active session IDs from the internal Map.
    getAllSessions(): string[] { return Array.from(this.sessions.keys()); }

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