analyze_browser_history
Analyze browser history to identify patterns, categorize domains, and generate reports with customizable time periods and detail levels.
Instructions
Step 3: Analyze browser history with different levels of detail.
This is the main analysis tool that consolidates all analysis options.
Args:
time_period_in_days: Number of days of history to analyze (default: 7)
analysis_type: Type of analysis to perform:
- "quick_summary": Basic stats only (fastest)
- "basic": Domain analysis and categorization (not yet implemented)
- "comprehensive": Full analysis with sessions and insights (default)
fast_mode: If True, limits analysis for faster processing (default: True)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time_period_in_days | No | ||
| analysis_type | No | comprehensive | |
| fast_mode | No |
Implementation Reference
- server/main.py:54-80 (handler)The primary handler and registration for the 'analyze_browser_history' tool via @mcp.tool() decorator. Dispatches to specific analysis helpers based on analysis_type.@mcp.tool() async def analyze_browser_history( time_period_in_days: int = 7, analysis_type: str = "comprehensive", fast_mode: bool = True ) -> Dict[str, Any]: """Step 3: Analyze browser history with different levels of detail. This is the main analysis tool that consolidates all analysis options. Args: time_period_in_days: Number of days of history to analyze (default: 7) analysis_type: Type of analysis to perform: - "quick_summary": Basic stats only (fastest) - "basic": Domain analysis and categorization (not yet implemented) - "comprehensive": Full analysis with sessions and insights (default) fast_mode: If True, limits analysis for faster processing (default: True) """ if analysis_type == "quick_summary": return await tool_get_quick_insights(time_period_in_days, CACHED_HISTORY) elif analysis_type == "basic": # For now, use comprehensive analysis with fast mode return await tool_get_browsing_insights(time_period_in_days, CACHED_HISTORY, fast_mode=True) elif analysis_type == "comprehensive": return await tool_get_browsing_insights(time_period_in_days, CACHED_HISTORY, fast_mode) else: raise ValueError(f"Unknown analysis_type: {analysis_type}. Use 'quick_summary', 'basic', or 'comprehensive'")