1- """Migration status prompt for Basic Memory MCP server."""
2-
3- from typing import Optional
1+ """Sync status prompt for Basic Memory MCP server."""
42
53from basic_memory .mcp .server import mcp
64
75
86@mcp .prompt (
9- description = """Get migration status with recommendations for AI assistants.
7+ description = """Get sync status with recommendations for AI assistants.
108
11- This prompt provides both current migration status and guidance on how
12- AI assistants should respond when migration is in progress or completed.
9+ This prompt provides both current sync status and guidance on how
10+ AI assistants should respond when sync operations are in progress or completed.
1311 """ ,
1412)
15- async def migration_status_prompt (
16- ) -> str :
17- """Get migration status with AI assistant guidance.
13+ async def sync_status_prompt () -> str :
14+ """Get sync status with AI assistant guidance.
1815
19- This prompt provides detailed migration status information along with
20- recommendations for how AI assistants should handle different migration states.
16+ This prompt provides detailed sync status information along with
17+ recommendations for how AI assistants should handle different sync states.
2118
2219 Returns:
23- Formatted migration status with AI assistant guidance
20+ Formatted sync status with AI assistant guidance
2421 """
2522 try :
2623 from basic_memory .services .migration_service import migration_manager
@@ -29,7 +26,7 @@ async def migration_status_prompt(
2926
3027 # Build status report
3128 lines = [
32- "# Basic Memory Migration Status" ,
29+ "# Basic Memory Sync Status" ,
3330 "" ,
3431 f"**Current Status**: { state .status .value .replace ('_' , ' ' ).title ()} " ,
3532 f"**System Ready**: { 'Yes' if migration_manager .is_ready else 'No' } " ,
@@ -39,9 +36,10 @@ async def migration_status_prompt(
3936 if migration_manager .is_ready :
4037 lines .extend (
4138 [
42- "✅ **All migrations completed** - System is fully operational" ,
39+ "✅ **All sync operations completed** - System is fully operational" ,
4340 "" ,
44- "All Basic Memory MCP tools are available and functioning normally." ,
41+ "All Basic Memory tools are available and functioning normally." ,
42+ "File indexing is complete and knowledge graphs are up to date." ,
4543 "You can proceed with any knowledge management tasks." ,
4644 ]
4745 )
@@ -56,59 +54,63 @@ async def migration_status_prompt(
5654 lines .extend (
5755 [
5856 "" ,
59- "🔄 **Migration in progress** - Legacy data is being migrated to new format " ,
57+ "🔄 **File synchronization in progress** - Processing files and building knowledge graphs " ,
6058 "" ,
6159 "**Impact**: Some tools may show status messages instead of normal responses" ,
62- "until migration completes (usually 1-3 minutes)." ,
60+ "until sync completes (usually 1-3 minutes)." ,
6361 ]
6462 )
6563
6664 elif state .status .value == "failed" :
6765 lines .extend (
6866 [
6967 "" ,
70- f"❌ **Migration failed**: { state .error or 'Unknown error' } " ,
68+ f"❌ **Sync failed**: { state .error or 'Unknown error' } " ,
7169 "" ,
7270 "**Impact**: System may have limited functionality until issue is resolved." ,
7371 ]
7472 )
7573
76- # Convert string parameter to boolean
77- include_recs = True
78-
79- if include_recs and not migration_manager .is_ready :
74+ # Add AI assistant recommendations
75+ if not migration_manager .is_ready :
8076 lines .extend (
8177 [
8278 "" ,
8379 "---" ,
8480 "" ,
8581 "## AI Assistant Recommendations" ,
8682 "" ,
87- "**When migration is in progress:**" ,
88- "- Inform the user about the background migration " ,
89- "- Suggest using `migration_status ()` tool to check progress" ,
90- "- Explain that most tools will work normally once migration completes" ,
91- "- Avoid creating complex workflows until migration is done" ,
83+ "**When sync is in progress:**" ,
84+ "- Inform the user about the background file processing " ,
85+ "- Suggest using `sync_status ()` tool to check progress" ,
86+ "- Explain that tools will work normally once sync completes" ,
87+ "- Avoid creating complex workflows until sync is done" ,
9288 "" ,
9389 "**What to tell users:**" ,
94- "- 'Basic Memory is upgrading your knowledge base in the background'" ,
95- "- 'This usually takes 1-3 minutes depending on your data size'" ,
96- "- 'You can check progress anytime with the migration_status tool'" ,
97- "- 'Most functionality will be available once the upgrade completes'" ,
90+ "- 'Basic Memory is processing your files and building knowledge graphs'" ,
91+ "- 'This usually takes 1-3 minutes depending on your content size'" ,
92+ "- 'You can check progress anytime with the sync_status tool'" ,
93+ "- 'Full functionality will be available once processing completes'" ,
94+ "" ,
95+ "**User-friendly language:**" ,
96+ "- Say 'processing files' instead of 'migration' or 'sync'" ,
97+ "- Say 'building knowledge graphs' instead of 'indexing'" ,
98+ "- Say 'setting up your knowledge base' instead of 'running migrations'" ,
9899 ]
99100 )
100101
101102 return "\n " .join (lines )
102103
103104 except Exception as e :
104- return f"""# Migration Status - Error
105+ return f"""# Sync Status - Error
105106
106- ❌ **Unable to check migration status**: { str (e )}
107+ ❌ **Unable to check sync status**: { str (e )}
107108
108109## AI Assistant Recommendations
109110
110111**When status is unavailable:**
111112- Assume the system is likely working normally
112113- Try proceeding with normal operations
113114- If users report issues, suggest checking logs or restarting
115+ - Use user-friendly language about 'setting up the knowledge base'
114116"""
0 commit comments