suggest_categories
Identify uncategorized URLs from browser history analysis for manual classification, enabling organized tracking of web activity patterns.
Instructions
Get uncategorized URLs for custom categorization. Use this after running analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server/main.py:91-95 (handler)The MCP tool handler for 'suggest_categories'. Decorated with @mcp.tool() for registration and executes the core logic by delegating to the helper function.@mcp.tool() async def suggest_categories() -> Dict[str, Any]: """Get uncategorized URLs for custom categorization. Use this after running analysis. """ return await tool_suggest_personalized_browser_categories(CACHED_HISTORY)
- server/analysis_utils.py:733-749 (helper)Supporting utility function that implements the categorization logic: categorizes history, extracts uncategorized URLs, and returns them grouped under 'URLs without categories'.async def tool_suggest_personalized_browser_categories(CACHED_HISTORY: CachedHistory) -> List[str]: if not CACHED_HISTORY.has_history(): raise RuntimeError("No history found. Please run @get_browsing_insights first.") # Categorize the history to find the uncategorized bucket history = CACHED_HISTORY.get_history() categorized_data = await categorize_browsing_history(history) # `other` holds anything we failed to classify uncategorized_entries = categorized_data.get("other", {}).get("entries", []) # Extract just the URLs so we can return them to the user new_categories = [e["url"] for e in uncategorized_entries] return {"URLs without categories": new_categories}