search_browser_history
Analyze and filter browser history data to find specific URLs and titles matching your search query. Helps identify patterns and relevant information for further analysis.
Instructions
Search browser history for specific queries. Use this after getting history data.
Args:
query: Search term to look for in URLs and titles
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes |
Implementation Reference
- server/browser_utils.py:637-655 (handler)Core implementation of the search functionality: checks cached history, fetches if needed, and searches URLs and titles case-insensitively.async def tool_search_browser_history(query: str, CACHED_HISTORY: CachedHistory) -> List[HistoryEntryDict]: if not CACHED_HISTORY.has_history(): history = await tool_get_browser_history(7, CACHED_HISTORY, "", True) else: history = CACHED_HISTORY.get_history() query_lower = query.lower() results = [] for entry in history: url = entry.get('url', '') title = entry.get('title', '') # Handle None values safely if (isinstance(url, str) and query_lower in url.lower()) or \ (isinstance(title, str) and query_lower in title.lower()): results.append(entry) return results
- server/main.py:82-90 (registration)MCP tool registration decorator and wrapper function that delegates to the core handler using the global CACHED_HISTORY.@mcp.tool() async def search_browser_history(query: str) -> List[HistoryEntryDict]: """Search browser history for specific queries. Use this after getting history data. Args: query: Search term to look for in URLs and titles """ return await tool_search_browser_history(query, CACHED_HISTORY)