vn6295337 Claude Opus 4.5 commited on
Commit
4de32a0
·
1 Parent(s): 7de6ec4

Fix news metric extraction - use 'results' field

Browse files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. mcp_client.py +2 -1
mcp_client.py CHANGED
@@ -367,7 +367,8 @@ async def _extract_and_emit_metrics(
367
  await emit_metric(progress_callback, source, "EV/EBITDA", ev_ebitda)
368
 
369
  elif source == "news":
370
- articles = result.get("articles") or []
 
371
  if articles and isinstance(articles, list) and len(articles) > 0:
372
  await emit_metric(progress_callback, source, "articles_found", len(articles))
373
  else:
 
367
  await emit_metric(progress_callback, source, "EV/EBITDA", ev_ebitda)
368
 
369
  elif source == "news":
370
+ # News MCP server returns "results" not "articles"
371
+ articles = result.get("results") or result.get("articles") or []
372
  if articles and isinstance(articles, list) and len(articles) > 0:
373
  await emit_metric(progress_callback, source, "articles_found", len(articles))
374
  else: