reddit-mcp-server 1.7.0 → 1.7.1

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/dist/bin.js CHANGED
@@ -3,12 +3,12 @@
3
3
  process.env.TRANSPORT_TYPE ??= "stdio";
4
4
  const args = process.argv.slice(2);
5
5
  if (args.includes("--version") || args.includes("-v")) {
6
- console.log("1.7.0");
6
+ console.log("1.7.1");
7
7
  process.exit(0);
8
8
  }
9
9
  if (args.includes("--help") || args.includes("-h")) {
10
10
  console.log(`
11
- Reddit MCP Server v1.7.0
11
+ Reddit MCP Server v1.7.1
12
12
 
13
13
  Usage: reddit-mcp-server [options]
14
14
 
package/dist/index.js CHANGED
@@ -1232,7 +1232,7 @@ var RedditClient = class {
1232
1232
  after,
1233
1233
  timeFilter
1234
1234
  });
1235
- return type === "sr" ? page : page.map((p) => withIgnoredSortNotice(p, sort === "new" ? void 0 : sort));
1235
+ return type === "sr" || sort === "relevance" ? page : page.map((p) => withIgnoredSortNotice(p, sort));
1236
1236
  }
1237
1237
  const params = new URLSearchParams({
1238
1238
  q: query,
@@ -1361,7 +1361,8 @@ function analyzeUserActivity(karmaRatio, isMod, accountAgeDays) {
1361
1361
  ].join("\n - ");
1362
1362
  }
1363
1363
  function analyzePostEngagement(score, ratio, numComments) {
1364
- return [...score > 1e3 && ratio > .95 ? ["Highly successful post with strong community approval"] : score > 100 && ratio > .8 ? ["Well-received post with good engagement"] : ratio < .5 ? ["Controversial post that sparked debate"] : [], ...numComments > 100 ? ["Generated significant discussion"] : numComments > score * .5 ? ["Highly discussable content with active comment section"] : numComments === 0 ? ["Yet to receive community interaction"] : []].join("\n - ");
1364
+ const insights = [...score > 1e3 && ratio > .95 ? ["Highly successful post with strong community approval"] : score > 100 && ratio > .8 ? ["Well-received post with good engagement"] : ratio < .5 ? ["Controversial post that sparked debate"] : [], ...numComments > 100 ? ["Generated significant discussion"] : numComments > score * .5 ? ["Highly discussable content with active comment section"] : numComments === 0 ? ["Yet to receive community interaction"] : []];
1365
+ return insights.length > 0 ? insights.join("\n - ") : "Moderate engagement with no standout signals";
1365
1366
  }
1366
1367
  function analyzeSubredditHealth(subscribers, activeUsers, ageDays) {
1367
1368
  const sizeInsights = subscribers > 1e6 ? ["Major subreddit with massive following"] : subscribers > 1e5 ? ["Well-established community"] : subscribers < 1e3 ? ["Niche community, potential for growth"] : [];
@@ -1513,7 +1514,7 @@ function formatCommentInfo(comment, maxLength = COMMENT_CONTENT_MAX_LENGTH) {
1513
1514
  }
1514
1515
  // src/index.ts
1515
1516
  dotenv.config({ quiet: true });
1516
- const VERSION = "1.7.0";
1517
+ const VERSION = "1.7.1";
1517
1518
  function validateUserAgent(userAgent, username) {
1518
1519
  if (!/^[\w-]+:[\w-]+:[\d.]+ \(by \/u\/\w+\)$/.test(userAgent)) {
1519
1520
  console.error("[Warning] User-Agent does not follow Reddit's recommended format");
@@ -2278,7 +2279,7 @@ server.addTool({
2278
2279
  const searchLocation = Option(args.subreddit).fold(() => "", (sr) => ` in r/${sr}`);
2279
2280
  return `# Reddit Search Results for: "${args.query}"${searchLocation}
2280
2281
 
2281
- Sorted by: ${args.sort} | Time: ${args.time_filter} | Type: ${args.type}
2282
+ Sorted by: ${page.source !== "arctic" ? args.sort : args.type === "sr" ? "subscribers (archive)" : "newest first (archive)"} | Time: ${args.time_filter} | Type: ${args.type}
2282
2283
 
2283
2284
  ${searchResults}${nextPageHint(page.after)}${sourceDisclaimer(page)}`;
2284
2285
  });