load_bookmark_data
Load browser bookmarks and history data from specified folders to enable web search capabilities through natural language queries.
Instructions
Load bookmarks and history data from files
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data_folder | No | data |
Implementation Reference
- server.py:28-36 (handler)The core handler function for the 'load_bookmark_data' MCP tool, registered with @mcp.tool(). It instantiates BookmarkOrganizer and calls its load_data() method to load and count bookmark/history items.def load_bookmark_data(data_folder: str = "data") -> str: """Load bookmarks and history data from files""" try: from bookmark_organizer import BookmarkOrganizer organizer = BookmarkOrganizer(data_folder) organizer.load_data() return f"Loaded {len(organizer.all_items)} total items from {data_folder}" except Exception as e: return f"Error loading data: {str(e)}"
- bookmark_organizer.py:227-246 (helper)Supporting method in BookmarkOrganizer class that loads bookmark data from HTML file and browser history from CSV file into self.all_items list.def load_data(self): """Load all bookmark and history data""" print("Loading data from files...") # Load bookmarks bookmark_file = self.data_folder / "bookmarks_10_26_25.html" if bookmark_file.exists(): bookmarks = self.parser.parse_netscape_html(str(bookmark_file)) self.all_items.extend(bookmarks) print(f"Loaded {len(bookmarks)} bookmarks") # Load history history_file = self.data_folder / "BrowserHistory_10_26_25.csv" if history_file.exists(): history = self.parser.parse_csv_history(str(history_file)) self.all_items.extend(history) print(f"Loaded {len(history)} history entries") print(f"Total items loaded: {len(self.all_items)}")