redditapis-mcp 0.1.4 → 0.1.6

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,34 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.6
4
+ - `reddit_deep_comment_search` v1.1, driven by a customer report that there was
5
+ no reliable way to expand a search past the first few posts:
6
+ - **Pagination.** The response `after` cursor is now honoured on input — pass it
7
+ back as `after` to expand the next batch of parent posts. Each call stays
8
+ bounded, so a caller can page as deep as they want. (The cursor was previously
9
+ returned but ignored.)
10
+ - **`limit` cap raised 10 -> 25** parent posts per call.
11
+ - **`max_comments`** optional cap on how many comments are returned; the
12
+ highest-scored are kept.
13
+ - Comments now come back **sorted by score** (highest first).
14
+ - Honest completeness meta: `comments_matched` (found) vs `comments_returned`
15
+ (after cap) vs `capped`, alongside `truncated`.
16
+ - Matching now runs on the **visible comment text at word boundaries** (link
17
+ URLs stripped), so a result always mentions the query where a reader can see
18
+ it — fixes the false positives from matching inside link URLs / as substrings.
19
+
20
+ ## 0.1.5
21
+ - Description honesty pass, three tool descriptions promised fields the live
22
+ response does not return. All found by the new V-DESC gate
23
+ (reconcile-description-shape.mjs), which probes EVERY tool against the live API
24
+ and asserts no description claims a field the response lacks:
25
+ - `reddit_search_media` claimed a `permalink`; the response carries `url`. Corrected.
26
+ - `reddit_subreddit_posts` claimed `flair` and `media`; neither is in the
27
+ `/posts` response (fields are title, author, upvotes, comments, permalink, url,
28
+ text). Removed.
29
+ - `reddit_post` claimed `body/selftext` and `media`; `/post/{id}` returns `text`
30
+ (no `body`, no `selftext`, no `media`). Corrected to `text`.
31
+
3
32
  ## 0.1.4
4
33
  - New tool `reddit_deep_comment_search`. Where `reddit_search_comments` returns
5
34
  the parent posts (Reddit's comment search never hands back the comment), this
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "redditapis-mcp",
3
- "version": "0.1.4",
3
+ "version": "0.1.6",
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
@@ -69,7 +69,7 @@ export const TOOLS = [
69
69
  name: "reddit_subreddit_posts",
70
70
  path: "/api/reddit/posts",
71
71
  description:
72
- "List posts from a subreddit by sort order. Use this to read a community's feed: newest, hot/trending, top-of-week, rising, etc. Returns post title, author, score, comment count, permalink, flair, and media, plus an `after` cursor for paging. Example: subreddit='programming' sort='top' t='week'.",
72
+ "List posts from a subreddit by sort order. Use this to read a community's feed: newest, hot/trending, top-of-week, rising, etc. Returns post title, author, score, comment count, and permalink, plus an `after` cursor for paging. Example: subreddit='programming' sort='top' t='week'.",
73
73
  shape: {
74
74
  subreddit: z.string().min(1).describe(
75
75
  "Subreddit name WITHOUT the r/ prefix (e.g. 'programming', 'AskReddit'). Required.",
@@ -126,14 +126,18 @@ export const TOOLS = [
126
126
  name: "reddit_deep_comment_search",
127
127
  path: "/api/reddit/search/comments/deep",
128
128
  description:
129
- "Genuine comment search: returns the ACTUAL comments whose body matches your keyword, with body, score, author, a comment-deep permalink, and the parent post. Unlike reddit_search_comments (which returns the parent posts, a Reddit limitation), this fetches each matching post's comment tree and filters the comment bodies for you, so you get first-hand opinions and answers directly. Premium call (it fans out into several reads): `limit` sets how many parent POSTS to expand, 1-10 (default 5), not how many comments come back. Best-effort: a deleted or deeply-nested comment may be missed (a truncated flag says when a tree was too deep). Example: q='best mechanical keyboard' sort='top'.",
129
+ "Genuine comment search: returns the ACTUAL comments whose body matches your keyword, sorted by score (highest first), with body, score, author, a comment-deep permalink, and the parent post. Unlike reddit_search_comments (which returns the parent posts, a Reddit limitation), this fetches each matching post's comment tree and filters the comment bodies for you, so you get first-hand opinions and answers directly. Premium call (it fans out into several reads): `limit` sets how many parent POSTS to expand, 1-25 (default 5), not how many comments come back. To go deeper than one call, paginate: pass the response's `after` cursor back as `after` to expand the NEXT batch of parent posts. `max_comments` optionally caps how many comments come back (the top-scored are kept). Matching is on the visible comment text at word boundaries (link URLs are ignored), so a result always mentions your query where a reader can see it. Best-effort: a deleted or deeply-nested comment may be missed (meta.truncated flags when a tree was too deep). Example: q='best mechanical keyboard' sort='top'.",
130
130
  shape: {
131
131
  ...QUERY,
132
132
  ...SORT_SEARCH,
133
133
  ...TIME_SEARCH,
134
134
  ...NSFW,
135
- limit: z.number().int().min(1).max(10).optional().describe(
136
- "Number of parent POSTS to expand into their comment trees (1-10, default 5). Each is one upstream read, so higher = deeper coverage but slower and more expensive.",
135
+ ...AFTER,
136
+ limit: z.number().int().min(1).max(25).optional().describe(
137
+ "Number of parent POSTS to expand into their comment trees (1-25, default 5). Each is one upstream read, so higher = deeper coverage but slower and more expensive. To go past 25, paginate with `after`.",
138
+ ),
139
+ max_comments: z.number().int().min(1).optional().describe(
140
+ "Optional cap on how many comments are returned; the highest-scored are kept. Omit to return every match. meta.capped is true when this trimmed the result.",
137
141
  ),
138
142
  },
139
143
  },
@@ -141,7 +145,7 @@ export const TOOLS = [
141
145
  name: "reddit_search_media",
142
146
  path: "/api/reddit/search/media",
143
147
  description:
144
- "Search Reddit posts filtered to media (images, video, gifs). Returns media posts with the media URL/type, author, score, and permalink. Use `kind` to narrow to a media type. Example: q='aurora borealis' kind='image'.",
148
+ "Search Reddit posts filtered to media (images, video, gifs). Returns media posts with the media URL/type, author, score, and the post url. Use `kind` to narrow to a media type. Example: q='aurora borealis' kind='image'.",
145
149
  shape: {
146
150
  ...QUERY,
147
151
  kind: z.enum(["image", "video", "gif", "all"]).optional().describe(
@@ -179,7 +183,7 @@ export const TOOLS = [
179
183
  name: "reddit_post",
180
184
  path: "/api/reddit/post/{id}",
181
185
  description:
182
- "Fetch a single Reddit post by its id. Returns the full post object (title, author, score, body/selftext, media, permalink, subreddit). Use when you already have a post id and want its details. Example: id='abc123' (the base-36 id, no t3_ prefix).",
186
+ "Fetch a single Reddit post by its id. Returns the full post object (title, author, score, text, permalink, subreddit, url). Use when you already have a post id and want its details. Example: id='abc123' (the base-36 id, no t3_ prefix).",
183
187
  shape: {
184
188
  id: z.string().min(1).describe(
185
189
  "The post's base-36 id (e.g. 'abc123'), without the 't3_' fullname prefix. Required (path parameter).",