redditapis-mcp 0.1.1 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.3
4
+ - `reddit_search_comments` description no longer overpromises. It previously
5
+ claimed to "Return matching comments with author, body, score" and to find
6
+ "opinions/answers buried in threads", but the endpoint returns PARENT POSTS,
7
+ not comment objects: Reddit's comment search is a MODE that matches comment
8
+ text and hands back the t3 posts, and does not expose which comment matched or
9
+ its body. The openapi spec already said this; the MCP tool description and the
10
+ README table had drifted and still promised comment bodies/scores the response
11
+ never contained. A customer relied on the old text and reported it as a bug.
12
+ The description now states the real behaviour. No API surface change.
13
+
14
+ ## 0.1.2
15
+ - `reddit_search` and `reddit_search_comments` now describe the `t` time window
16
+ accurately. Unlike a subreddit listing, search applies `t` to the `relevance`
17
+ and `top` sorts as well, and when it is omitted Reddit defaults to `all` — so a
18
+ broad relevance query surfaces old high-upvote posts that only loosely match.
19
+ The tool description now says so, which materially changes the queries an agent
20
+ writes. No API surface change.
21
+
22
+ ## 0.1.1
23
+ - Corrected package metadata.
24
+
25
+
3
26
  ## 0.1.0
4
27
  - Initial release: 11 read tools over the redditapis.com API (subreddit listings,
5
28
  post/comment/community/user/media search, comment tree, subreddit top posts,
package/README.md CHANGED
@@ -47,7 +47,7 @@ authenticated surface and are intentionally not exposed here.
47
47
  | `reddit_search` | `GET /api/reddit/search` | Search posts across Reddit or one subreddit |
48
48
  | `reddit_post_comments` | `GET /api/reddit/comments` | A post + its comment tree, by permalink |
49
49
  | `reddit_search_communities` | `GET /api/reddit/search/communities` | Find subreddits by name/topic |
50
- | `reddit_search_comments` | `GET /api/reddit/search/comments` | Search comments (not posts) |
50
+ | `reddit_search_comments` | `GET /api/reddit/search/comments` | Search by comment text; returns the parent posts (Reddit limitation) |
51
51
  | `reddit_search_media` | `GET /api/reddit/search/media` | Search image/video/gif posts |
52
52
  | `reddit_search_users` | `GET /api/reddit/search/users` | Find redditors by name |
53
53
  | `reddit_subreddit_top` | `GET /api/reddit/sub/{name}/top` | Top posts of a subreddit for a time window |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redditapis-mcp",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Official MCP server for redditapis.com, the Reddit API (subreddit listings, post + comment + community + user + media search, comment trees, top posts, user profiles) as native tools for Claude, Cursor, and any MCP client.",
5
5
  "repository": {
6
6
  "type": "git",
package/src/tools.js CHANGED
@@ -43,6 +43,15 @@ const TIME = {
43
43
  "Time window, only applied when sort is 'top' or 'controversial'. E.g. 'week' = top of the past week. Ignored for other sorts.",
44
44
  ),
45
45
  };
46
+ // Search honours `t` differently from a subreddit listing: it bounds the whole
47
+ // result set (including the 'relevance' and 'top' sorts), not just top/controversial.
48
+ // Omitting it makes Reddit default to 'all', which lets old high-upvote posts win a
49
+ // broad 'relevance' query, so search gets a separate, search-accurate description.
50
+ const TIME_SEARCH = {
51
+ t: z.enum(["hour", "day", "week", "month", "year", "all"]).optional().describe(
52
+ "Time window that bounds which posts the search returns, e.g. 'week' = only posts from the past week. Unlike a subreddit listing, search applies this to the 'relevance' and 'top' sorts too. When omitted, Reddit defaults to 'all', so a broad 'relevance' query surfaces old high-upvote posts that only loosely match. Pass 'week' or 'month' to keep results recent and on-topic.",
53
+ ),
54
+ };
46
55
  const NSFW = {
47
56
  nsfw: z.enum(["true", "false"]).optional().describe(
48
57
  "Set 'true' to include over-18 / NSFW results. Omit or 'false' to exclude them (default).",
@@ -82,7 +91,7 @@ export const TOOLS = [
82
91
  "Optional subreddit name (without r/) to restrict the search to one community. Omit to search all of Reddit.",
83
92
  ),
84
93
  ...SORT_SEARCH,
85
- ...TIME,
94
+ ...TIME_SEARCH,
86
95
  ...AFTER,
87
96
  ...NSFW,
88
97
  ...LIMIT,
@@ -110,8 +119,8 @@ export const TOOLS = [
110
119
  name: "reddit_search_comments",
111
120
  path: "/api/reddit/search/comments",
112
121
  description:
113
- "Search Reddit COMMENTS (not posts) by keyword across Reddit. Returns matching comments with author, body, score, subreddit, and the parent post link. Use to find first-hand opinions/answers buried in threads. Example: q='best mechanical keyboard' sort='top'.",
114
- shape: { ...QUERY, ...SORT_SEARCH, ...TIME, ...AFTER, ...NSFW, ...LIMIT },
122
+ "Search Reddit by COMMENT text. Reddit's comment search matches your keyword against comment bodies but returns the PARENT POSTS, not the individual comments, so each result is a post whose discussion mentions your query, carrying that post's title, selftext, score, and comment count. Use it to surface threads where a topic comes up in the replies that plain post-title search would miss. Reddit does not expose which specific comment matched or its text, so this returns posts, not comment bodies. Example: q='best mechanical keyboard' sort='top'.",
123
+ shape: { ...QUERY, ...SORT_SEARCH, ...TIME_SEARCH, ...AFTER, ...NSFW, ...LIMIT },
115
124
  },
116
125
  {
117
126
  name: "reddit_search_media",
@@ -124,7 +133,7 @@ export const TOOLS = [
124
133
  "Media type filter. 'image', 'video', 'gif', or 'all' (default). Filters the raw Reddit results to that media kind.",
125
134
  ),
126
135
  ...SORT_SEARCH,
127
- ...TIME,
136
+ ...TIME_SEARCH,
128
137
  ...AFTER,
129
138
  ...NSFW,
130
139
  ...LIMIT,