Skip to main content
Glama

safari_list_sessions

Retrieve all active Safari browser sessions using this tool to monitor and manage ongoing browser activities, enabling efficient debugging and automation.

Instructions

List all active Safari sessions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary handler function for 'safari_list_sessions' tool. It fetches active sessions from the driver manager and returns a formatted text response listing them.
    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')}` } ]; }
  • Input schema definition for the tool, specifying an empty object (no required parameters).
    inputSchema: { type: 'object', properties: {} }
  • Tool handler registration in the switch statement of the central handleToolCall method.
    case 'safari_list_sessions': return await this.listSessions();
  • Helper method in SafariDriverManager that retrieves all active session IDs from the internal sessions 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