Diomedes Git commited on
Commit
362ffad
·
1 Parent(s): a79e071

fixing some minor bugs that crept in (eg get_bird_sightings was get_bird_sightings_tool in server.py, also an indent error that broke function and dropped a return), making the news search a cascade pattern (like trend etc), updating observation entrypoint, etc

Browse files
.cursorignore ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dependencies
2
+ node_modules/
3
+ .venv/
4
+ venv/
5
+ __pycache__/
6
+
7
+ # Data & assets
8
+ *.mp3
9
+ *.wav
10
+ *.mp4
11
+ *.jpg
12
+ *.png
13
+ *.pdf
14
+ data/
15
+ datasets/
16
+
17
+ # Build artifacts
18
+ dist/
19
+ build/
20
+ *.pyc
21
+ .pytest_cache/
22
+
23
+ # Old/archived
24
+ **/archived/
25
+ **/old/
26
+ dev_diary/
27
+
28
+ # IDE
29
+ .vscode/
30
+ .idea/
31
+ *.swp
32
+
33
+ # Misc
34
+ .DS_Store
35
+ .env
36
+
37
+
src/cluas_mcp/news/news_search_entrypoint.py CHANGED
@@ -146,4 +146,4 @@ def verify_claim(claim: str) -> dict:
146
  "explanation": f"This is a mock verification result for the claim: '{claim}'. Real implementation would use a fact-checking API to verify the claim.",
147
  "sources": [],
148
  "source": "mock_data"
149
- }
 
146
  "explanation": f"This is a mock verification result for the claim: '{claim}'. Real implementation would use a fact-checking API to verify the claim.",
147
  "sources": [],
148
  "source": "mock_data"
149
+ }
src/cluas_mcp/observation/observation_entrypoint.py CHANGED
@@ -3,7 +3,7 @@ from src.cluas_mcp.observation.ebird import get_bird_sightings, format_sightings
3
 
4
  logger = logging.getLogger(__name__)
5
 
6
- def get_bird_sightings_tool(location: str = "HuggingFace HQ, Brooklyn, NY") -> dict:
7
  """
8
  Get recent bird sightings near a location.
9
 
@@ -87,3 +87,4 @@ def analyze_temporal_patterns(data_type: str, location: str = "global") -> dict:
87
  "time_range": "2023-01-01 to 2024-01-15",
88
  "source": "mock_data"
89
  }
 
 
3
 
4
  logger = logging.getLogger(__name__)
5
 
6
+ def get_bird_sightings(location: str = "HuggingFace HQ, Brooklyn, NY") -> dict:
7
  """
8
  Get recent bird sightings near a location.
9
 
 
87
  "time_range": "2023-01-01 to 2024-01-15",
88
  "source": "mock_data"
89
  }
90
+
src/cluas_mcp/server.py CHANGED
@@ -232,8 +232,8 @@ async def call_tool(tool_name: str, arguments: dict) -> list[TextContent]:
232
 
233
  # Raven tools
234
  elif tool_name == "search_news":
235
- query = arguments.get("query")
236
- if not query:
237
  raise ValueError("query is required for search_news")
238
  max_results = arguments.get("max_results", 5)
239
  results = await loop.run_in_executor(None, search_news, query, max_results)
@@ -268,7 +268,7 @@ async def call_tool(tool_name: str, arguments: dict) -> list[TextContent]:
268
  timeframe = arguments.get("timeframe", "recent")
269
  results = await loop.run_in_executor(None, get_weather_patterns, location, timeframe)
270
  formatted = format_weather_patterns(results)
271
- return [TextContent(type="text", text=formatted)]
272
 
273
  elif tool_name == "analyze_temporal_patterns":
274
  data_type = arguments.get("data_type")
 
232
 
233
  # Raven tools
234
  elif tool_name == "search_news":
235
+ query = arguments.get("query")
236
+ if not query:
237
  raise ValueError("query is required for search_news")
238
  max_results = arguments.get("max_results", 5)
239
  results = await loop.run_in_executor(None, search_news, query, max_results)
 
268
  timeframe = arguments.get("timeframe", "recent")
269
  results = await loop.run_in_executor(None, get_weather_patterns, location, timeframe)
270
  formatted = format_weather_patterns(results)
271
+ return [TextContent(type="text", text=formatted)]
272
 
273
  elif tool_name == "analyze_temporal_patterns":
274
  data_type = arguments.get("data_type")
src/cluas_mcp/web/web_search_entrypoint.py CHANGED
@@ -141,3 +141,4 @@ def get_quick_facts(topic: str) -> dict:
141
 
142
 
143
 
 
 
141
 
142
 
143
 
144
+