claude-self-reflect 2.5.8 → 2.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "claude-self-reflect-mcp"
3
- version = "2.5.8"
3
+ version = "2.5.9"
4
4
  description = "MCP server for Claude self-reflection with memory decay"
5
5
  # readme = "README.md"
6
6
  requires-python = ">=3.10"
@@ -192,10 +192,13 @@ async def reflect_on_past(
192
192
 
193
193
  # Determine project scope
194
194
  target_project = project
195
+
196
+ # Always get the working directory for logging purposes
197
+ cwd = os.environ.get('MCP_CLIENT_CWD', os.getcwd())
198
+
195
199
  if project is None:
196
200
  # Use MCP_CLIENT_CWD environment variable set by run-mcp.sh
197
201
  # This contains the actual working directory where Claude Code is running
198
- cwd = os.environ.get('MCP_CLIENT_CWD', os.getcwd())
199
202
 
200
203
  # Extract project name from path (e.g., /Users/.../projects/project-name)
201
204
  path_parts = Path(cwd).parts
@@ -744,18 +747,17 @@ async def quick_search(
744
747
  project: Optional[str] = Field(default=None, description="Search specific project only. If not provided, searches current project based on working directory. Use 'all' to search across all projects.")
745
748
  ) -> str:
746
749
  """Quick search that returns only the count and top result for fast overview."""
747
- try:
748
- # Leverage reflect_on_past with optimized parameters
749
- result = await reflect_on_past(
750
- ctx=ctx,
751
- query=query,
752
- limit=1, # Only get the top result
753
- min_score=min_score,
754
- project=project,
755
- response_format="xml",
756
- brief=True, # Use brief mode for minimal response
757
- include_raw=False
758
- )
750
+ # MCP architectural limitation: MCP tools cannot call other MCP tools
751
+ return """<error>
752
+ MCP Architectural Limitation: This tool cannot directly call other MCP tools.
753
+
754
+ To perform a quick search, please:
755
+ 1. Call reflect_on_past directly with limit=1 and brief=True
756
+ 2. Or use the reflection-specialist agent for quick searches
757
+
758
+ This limitation exists because MCP tools can only be orchestrated by the client (Claude),
759
+ not by other tools within the MCP server.
760
+ </error>"""
759
761
 
760
762
  # Parse and reformat for quick overview
761
763
  import re
@@ -795,17 +797,20 @@ async def search_summary(
795
797
  project: Optional[str] = Field(default=None, description="Search specific project only. If not provided, searches current project based on working directory. Use 'all' to search across all projects.")
796
798
  ) -> str:
797
799
  """Get aggregated insights from search results without individual result details."""
798
- # Get more results for better summary
799
- result = await reflect_on_past(
800
- ctx=ctx,
801
- query=query,
802
- limit=10, # Get more results for analysis
803
- min_score=0.6, # Lower threshold for broader context
804
- project=project,
805
- response_format="xml",
806
- brief=False, # Get full excerpts for analysis
807
- include_raw=False
808
- )
800
+ # MCP architectural limitation: MCP tools cannot call other MCP tools
801
+ # This is a fundamental constraint of the MCP protocol
802
+ return """<error>
803
+ MCP Architectural Limitation: This tool cannot directly call other MCP tools.
804
+
805
+ To get a search summary, please use the reflection-specialist agent instead:
806
+ 1. Call the reflection-specialist agent
807
+ 2. Ask it to provide a summary of search results for your query
808
+
809
+ Alternative: Call reflect_on_past directly and analyze the results yourself.
810
+
811
+ This limitation exists because MCP tools can only be orchestrated by the client (Claude),
812
+ not by other tools within the MCP server.
813
+ </error>"""
809
814
 
810
815
  # Parse results for summary generation
811
816
  import re
@@ -869,21 +874,17 @@ async def get_more_results(
869
874
  project: Optional[str] = Field(default=None, description="Search specific project only")
870
875
  ) -> str:
871
876
  """Get additional search results after an initial search (pagination support)."""
872
- # Note: Since Qdrant doesn't support true offset in our current implementation,
873
- # we'll fetch offset+limit results and slice
874
- total_limit = offset + limit
875
-
876
- # Get the larger result set
877
- result = await reflect_on_past(
878
- ctx=ctx,
879
- query=query,
880
- limit=total_limit,
881
- min_score=min_score,
882
- project=project,
883
- response_format="xml",
884
- brief=False,
885
- include_raw=False
886
- )
877
+ # MCP architectural limitation: MCP tools cannot call other MCP tools
878
+ return """<error>
879
+ MCP Architectural Limitation: This tool cannot directly call other MCP tools.
880
+
881
+ To get more search results, please:
882
+ 1. Call reflect_on_past directly with a higher limit parameter
883
+ 2. Or use the reflection-specialist agent to handle pagination
884
+
885
+ This limitation exists because MCP tools can only be orchestrated by the client (Claude),
886
+ not by other tools within the MCP server.
887
+ </error>"""
887
888
 
888
889
  # Parse and extract only the additional results
889
890
  import re
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-self-reflect",
3
- "version": "2.5.8",
3
+ "version": "2.5.9",
4
4
  "description": "Give Claude perfect memory of all your conversations - Installation wizard for Python MCP server",
5
5
  "keywords": [
6
6
  "claude",