get_archived_notes
Retrieve all archived notes from Bear Notes on macOS to access and manage previously stored content through the MCP Bear server.
Instructions
Get all archived notes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/mcp_bear/database.py:182-211 (handler)The implementation of the get_archived_notes function, which queries the ZSFNOTE table for entries where ZARCHIVED=1.
def get_archived_notes() -> list[dict[str, Any]]: """ Retrieve all archived notes from Bear. Returns: List of archived notes """ db_path = get_bear_db_path() conn = sqlite3.connect(db_path) conn.row_factory = sqlite3.Row cursor = conn.cursor() try: cursor.execute("SELECT * FROM ZSFNOTE WHERE ZARCHIVED=1;") rows = cursor.fetchall() notes = [] for row in rows: notes.append({ "ZCREATIONDATE": row["ZCREATIONDATE"], "ZSUBTITLE": row["ZSUBTITLE"], "ZTEXT": row["ZTEXT"], "ZTITLE": row["ZTITLE"], "ZUNIQUEIDENTIFIER": row["ZUNIQUEIDENTIFIER"], }) return notes finally: conn.close()