crawlforge-mcp-server 3.0.14 → 3.0.16

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "crawlforge-mcp-server",
3
- "version": "3.0.14",
3
+ "version": "3.0.16",
4
4
  "description": "CrawlForge MCP Server - Professional Model Context Protocol server with 19 comprehensive web scraping, crawling, and content processing tools.",
5
5
  "main": "server.js",
6
6
  "bin": {
@@ -508,23 +508,28 @@ export class ResearchOrchestrator extends EventEmitter {
508
508
 
509
509
  if (contentData && contentData.content) {
510
510
  this.metrics.contentExtracted++;
511
-
511
+
512
+ // Normalize content to string (extract_content returns {text: "..."}, fallback returns string)
513
+ const contentText = typeof contentData.content === 'string'
514
+ ? contentData.content
515
+ : (contentData.content.text || JSON.stringify(contentData.content));
516
+
512
517
  // Enhance source with extracted content
513
518
  let enhancedSource = {
514
519
  ...source,
515
- extractedContent: contentData.content,
520
+ extractedContent: contentText,
516
521
  metadata: contentData.metadata,
517
522
  structuredData: contentData.structuredData,
518
523
  extractedAt: new Date().toISOString(),
519
- wordCount: contentData.content.split(' ').length,
520
- readabilityScore: this.calculateReadabilityScore(contentData.content)
524
+ wordCount: contentText.split(' ').length,
525
+ readabilityScore: this.calculateReadabilityScore(contentText)
521
526
  };
522
527
 
523
528
  // LLM-powered relevance analysis
524
529
  if (this.enableLLMFeatures && topic) {
525
530
  try {
526
531
  const relevanceAnalysis = await this.llmManager.analyzeRelevance(
527
- contentData.content,
532
+ contentText,
528
533
  topic,
529
534
  { maxContentLength: 2000 }
530
535
  );
@@ -546,11 +551,11 @@ export class ResearchOrchestrator extends EventEmitter {
546
551
  error: llmError.message
547
552
  });
548
553
  // Set default relevance score
549
- enhancedSource.relevanceScore = this.calculateTraditionalRelevance(contentData.content, topic);
554
+ enhancedSource.relevanceScore = this.calculateTraditionalRelevance(contentText, topic);
550
555
  }
551
556
  } else {
552
557
  // Fallback relevance calculation
553
- enhancedSource.relevanceScore = this.calculateTraditionalRelevance(contentData.content, topic);
558
+ enhancedSource.relevanceScore = this.calculateTraditionalRelevance(contentText, topic);
554
559
  }
555
560
 
556
561
  this.researchState.extractedContent.set(source.link, enhancedSource);
@@ -738,14 +743,16 @@ export class ResearchOrchestrator extends EventEmitter {
738
743
  }
739
744
  });
740
745
 
741
- if (summary.keyPoints) {
742
- summary.keyPoints.forEach((point, index) => {
746
+ // Handle both keypoints (tool output) and keyPoints (legacy) property names
747
+ const keyPoints = summary.keypoints || summary.keyPoints || [];
748
+ if (keyPoints.length > 0) {
749
+ keyPoints.forEach((point, index) => {
743
750
  claims.push({
744
751
  id: `${source.link}_claim_${index}`,
745
752
  claim: point,
746
753
  source: source.link,
747
754
  sourceTitle: source.title,
748
- credibility: source.overallCredibility || 0.5,
755
+ credibility: source.overallCredibility || 0.65,
749
756
  context: summary.supporting?.[index] || '',
750
757
  extractedAt: new Date().toISOString()
751
758
  });
@@ -1080,7 +1087,7 @@ export class ResearchOrchestrator extends EventEmitter {
1080
1087
 
1081
1088
  generateKeyFindings(claimGroups, sources) {
1082
1089
  return claimGroups
1083
- .filter(group => group.avgCredibility >= 0.6)
1090
+ .filter(group => group.avgCredibility >= 0.3)
1084
1091
  .sort((a, b) => b.consensusStrength - a.consensusStrength)
1085
1092
  .slice(0, 10)
1086
1093
  .map(group => ({
@@ -1093,7 +1100,7 @@ export class ResearchOrchestrator extends EventEmitter {
1093
1100
 
1094
1101
  compileSupportingEvidence(sources) {
1095
1102
  return sources
1096
- .filter(source => source.overallCredibility >= 0.7)
1103
+ .filter(source => source.overallCredibility >= 0.3)
1097
1104
  .map(source => ({
1098
1105
  title: source.title,
1099
1106
  url: source.link,