Skip to main content
Glama
mixophrygian

Browser History Analysis MCP

by mixophrygian

diagnose_safari_support

Diagnose Safari browser support and accessibility to debug integration issues with browser history analysis tools.

Instructions

Diagnose Safari support and accessibility. Useful for debugging Safari integration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • MCP tool handler for 'diagnose_safari_support'. Decorated with @mcp.tool() for registration and execution. Delegates to check_safari_accessibility() helper function.
    @mcp.tool()
    def diagnose_safari_support() -> Dict[str, Any]:
        """Diagnose Safari support and accessibility. Useful for debugging Safari integration."""
        return check_safari_accessibility()
  • Core diagnostic function that checks Safari installation, profile and history paths, attempts database connection, lists available tables, and provides detailed accessibility status and recommendations.
    def check_safari_accessibility() -> Dict[str, Any]:
        """Check Safari accessibility and provide diagnostics"""
        result = {
            "safari_installed": os.path.exists("/Applications/Safari.app"),
            "profile_path": get_safari_profile_path(),
            "history_path": PATH_TO_SAFARI_HISTORY,
            "accessible": False,
            "error": None,
            "limitations": "Modern Safari (macOS 10.15+) uses CloudKit for history syncing and has limited programmatic access"
        }
        
        if not result["safari_installed"]:
            result["error"] = "Safari is not installed"
            return result
        
        if not result["history_path"]:
            result["error"] = "Safari history database not found"
            result["recommendation"] = "Consider using Firefox or Chrome for browser history analysis, or export Safari history manually through Safari's interface"
            return result
        
        try:
            # Try to connect to the database
            conn = sqlite3.connect(f"file:{result['history_path']}?mode=ro", uri=True)
            cursor = conn.cursor()
            cursor.execute("SELECT name FROM sqlite_master WHERE type='table';")
            tables = [row[0] for row in cursor.fetchall()]
            conn.close()
            
            result["accessible"] = True
            result["tables"] = tables
            result["message"] = f"Safari database accessible with {len(tables)} tables"
            result["note"] = "This may be limited data - modern Safari uses CloudKit for full history syncing"
        except Exception as e:
            result["error"] = str(e)
            result["message"] = "Safari database not accessible"
            result["recommendation"] = "Modern Safari has limited programmatic access. Consider using Firefox or Chrome for browser history analysis"
        
        return result
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. The description mentions 'diagnose' and 'debugging,' which implies a read-only analysis, but it does not clarify if this tool performs any mutations, requires specific permissions, has rate limits, or what the output entails. For a tool with zero annotation coverage, this is a significant gap in transparency about its behavior and constraints.

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

Conciseness4/5

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

The description is concise with two short sentences that directly state the purpose and usage context without unnecessary details. It is front-loaded with the core function. However, it could be slightly more structured by explicitly separating purpose from guidelines, but overall, it earns its place efficiently.

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

Completeness3/5

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

Given the tool has 0 parameters, 100% schema coverage, and an output schema exists (which means return values are documented elsewhere), the description provides a basic purpose and usage hint. However, for a diagnostic tool with no annotations, it lacks details on what 'diagnose' entails, potential side effects, or integration specifics, making it minimally adequate but with clear gaps in completeness.

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

Parameters4/5

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

The tool has 0 parameters, and the schema description coverage is 100%, meaning there are no parameters to document. The description does not need to add parameter semantics beyond what the schema provides. According to the rules, for 0 parameters, the baseline score is 4, as the description appropriately does not waste space on non-existent parameters.

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

Purpose3/5

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

The description states the tool 'diagnose[s] Safari support and accessibility' and mentions it's 'useful for debugging Safari integration,' which gives a general purpose. However, it lacks specificity about what 'diagnose' entails (e.g., what aspects of support/accessibility) and does not clearly differentiate from sibling tools like 'check_browser_status' or 'health_check,' which might overlap in functionality. This results in a vague but not tautological purpose.

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 minimal guidance by stating it's 'useful for debugging Safari integration,' which implies a context of troubleshooting. However, it does not specify when to use this tool versus alternatives like 'check_browser_status' or 'health_check,' nor does it mention any prerequisites or exclusions. This lack of explicit when/when-not usage or named alternatives leaves the agent with insufficient guidance.

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/mixophrygian/browser_history_mcp'

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