redditapis-mcp 0.1.10 → 0.1.12
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 +19 -0
- package/README.md +220 -30
- package/package.json +6 -3
- package/smithery.yaml +27 -0
- package/src/tools.js +38 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.1.12
|
|
4
|
+
- reddit_search gains advanced filters applied to the returned page (the pullpush
|
|
5
|
+
filter-power model): min_score/max_score, min_comments/max_comments, is_video,
|
|
6
|
+
is_self, over_18, locked, stickied, spoiler, contest_mode, and sort_type
|
|
7
|
+
(score/num_comments/created). Because filtering is post-hoc on a page, the
|
|
8
|
+
response adds a meta object (fetched, returned, filtered_out); paginate with
|
|
9
|
+
after to filter more. No price change ($0.002), no new endpoint.
|
|
10
|
+
|
|
11
|
+
## 0.1.11
|
|
12
|
+
- Two new read tools for subreddit governance (both $0.002, one upstream read each):
|
|
13
|
+
- **`reddit_subreddit_moderators`** (`GET /api/reddit/sub/{name}/moderators`),
|
|
14
|
+
a subreddit's moderator team: each moderator's username, id, mod permissions,
|
|
15
|
+
flair text, and the time they were added. Returns a `moderators` list.
|
|
16
|
+
- **`reddit_subreddit_wiki`** (`GET /api/reddit/sub/{name}/wiki/{page}`), a
|
|
17
|
+
subreddit's wiki page by name and page: the page's markdown and HTML content,
|
|
18
|
+
a may-revise flag, and the last revision's metadata. Returns a single object.
|
|
19
|
+
The page may be multi-segment, for example index, rules, or config/sidebar.
|
|
20
|
+
- Brings the published read-only tool count to 22.
|
|
21
|
+
|
|
3
22
|
## 0.1.10
|
|
4
23
|
- Three new read tools for community DISCOVERY (all $0.002, one upstream read each):
|
|
5
24
|
- **`reddit_subreddits_popular`** (`GET /api/reddit/subreddits/popular`), browse
|
package/README.md
CHANGED
|
@@ -1,20 +1,62 @@
|
|
|
1
1
|
# redditapis-mcp
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/redditapis-mcp)
|
|
4
|
+
[](https://www.npmjs.com/package/redditapis-mcp)
|
|
5
|
+
[](./LICENSE)
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
Official **Model Context Protocol** server for [redditapis.com](https://www.redditapis.com), the Reddit API as native tools for Claude, Cursor, Windsurf, and any MCP client. It turns Reddit reads (search, subreddit listings, comment trees, user profiles, community metadata) into typed tools your agent can call directly.
|
|
8
|
+
|
|
9
|
+
Ask your agent to search Reddit for a topic, read a community's top posts of the week, pull a user's comment history, surface the redditors talking about a product, or read a subreddit's rules before you engage, and it calls the API for you. Every tool maps to a REST endpoint at `https://api.redditapis.com`; the server holds no state and forwards your API key on each call.
|
|
10
|
+
|
|
11
|
+
## Quick start
|
|
12
|
+
|
|
13
|
+
No install needed. Run with `npx`. You need one thing: an API key from **[redditapis.com](https://www.redditapis.com)**. Reads work with just that key, so there is no account login or session step to set up.
|
|
11
14
|
|
|
12
15
|
## Setup
|
|
13
16
|
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
### Claude Desktop
|
|
18
|
+
|
|
19
|
+
Edit `claude_desktop_config.json` (Settings > Developer > Edit Config):
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"mcpServers": {
|
|
24
|
+
"reddit": {
|
|
25
|
+
"command": "npx",
|
|
26
|
+
"args": ["-y", "redditapis-mcp@latest"],
|
|
27
|
+
"env": { "REDDITAPIS_KEY": "YOUR_API_KEY" }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Restart Claude Desktop. The `reddit_*` tools appear in the tool picker.
|
|
34
|
+
|
|
35
|
+
### Claude Code
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
claude mcp add reddit --env REDDITAPIS_KEY=YOUR_API_KEY -- npx -y redditapis-mcp@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Cursor
|
|
42
|
+
|
|
43
|
+
`~/.cursor/mcp.json` (or Settings > MCP > Add New Server):
|
|
44
|
+
|
|
45
|
+
```json
|
|
46
|
+
{
|
|
47
|
+
"mcpServers": {
|
|
48
|
+
"reddit": {
|
|
49
|
+
"command": "npx",
|
|
50
|
+
"args": ["-y", "redditapis-mcp@latest"],
|
|
51
|
+
"env": { "REDDITAPIS_KEY": "YOUR_API_KEY" }
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### Windsurf
|
|
16
58
|
|
|
17
|
-
|
|
59
|
+
`~/.codeium/windsurf/mcp_config.json`:
|
|
18
60
|
|
|
19
61
|
```json
|
|
20
62
|
{
|
|
@@ -22,48 +64,196 @@ server to your MCP client. It runs over stdio via `npx` (no install needed):
|
|
|
22
64
|
"reddit": {
|
|
23
65
|
"command": "npx",
|
|
24
66
|
"args": ["-y", "redditapis-mcp@latest"],
|
|
25
|
-
"env": { "REDDITAPIS_KEY": "
|
|
67
|
+
"env": { "REDDITAPIS_KEY": "YOUR_API_KEY" }
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### VS Code (Copilot / agent mode)
|
|
74
|
+
|
|
75
|
+
`.vscode/mcp.json` in your workspace, or the user-level MCP settings:
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"servers": {
|
|
80
|
+
"reddit": {
|
|
81
|
+
"type": "stdio",
|
|
82
|
+
"command": "npx",
|
|
83
|
+
"args": ["-y", "redditapis-mcp@latest"],
|
|
84
|
+
"env": { "REDDITAPIS_KEY": "YOUR_API_KEY" }
|
|
26
85
|
}
|
|
27
86
|
}
|
|
28
87
|
}
|
|
29
88
|
```
|
|
30
89
|
|
|
31
|
-
## Configuration
|
|
90
|
+
## Configuration
|
|
32
91
|
|
|
33
|
-
|
|
|
92
|
+
| Env var | Required | Default | Purpose |
|
|
34
93
|
|---|---|---|---|
|
|
35
|
-
| `REDDITAPIS_KEY` |
|
|
36
|
-
| `REDDITAPIS_BASE_URL` |
|
|
37
|
-
| `REDDITAPIS_TIMEOUT_MS` |
|
|
94
|
+
| `REDDITAPIS_KEY` | Yes | (none) | API key from [redditapis.com](https://www.redditapis.com). `REDDIT_APIS_KEY` is accepted as an alias. |
|
|
95
|
+
| `REDDITAPIS_BASE_URL` | No | `https://api.redditapis.com` | Override the API host. |
|
|
96
|
+
| `REDDITAPIS_TIMEOUT_MS` | No | `30000` | Per-request timeout in milliseconds. |
|
|
97
|
+
|
|
98
|
+
Authentication is a Bearer token: the server sends `Authorization: Bearer <REDDITAPIS_KEY>` on every request.
|
|
38
99
|
|
|
39
100
|
## Tools
|
|
40
101
|
|
|
41
|
-
|
|
42
|
-
|
|
102
|
+
22 tools, all reads. This server is **read-only** by design. Reddit writes (posting, commenting, voting, DMs) are a separate authenticated surface and are intentionally out of scope here, so every tool below works with just your API key, with no account login or session step.
|
|
103
|
+
|
|
104
|
+
A few conventions across the catalog:
|
|
105
|
+
|
|
106
|
+
- Subreddit names go in **without** the `r/` prefix, and usernames **without** the `u/` prefix. `reddit_subreddit_posts` takes its community as `subreddit`; the `/sub/{name}/...` tools take it as `name`.
|
|
107
|
+
- Listing and search tools return an `after` cursor. Pass it back as `after` to fetch the next page. `limit` accepts 1 to 100 (the API clamps out-of-range values).
|
|
108
|
+
- `t` (`hour`, `day`, `week`, `month`, `year`, `all`) sets the time window; on subreddit listings it applies to the `top` and `controversial` sorts, and on search it bounds the whole result set.
|
|
109
|
+
|
|
110
|
+
### Search and discovery
|
|
43
111
|
|
|
44
112
|
| Tool | Endpoint | What it does |
|
|
45
113
|
|---|---|---|
|
|
46
|
-
| `
|
|
47
|
-
| `
|
|
48
|
-
| `
|
|
49
|
-
| `
|
|
50
|
-
| `
|
|
51
|
-
| `
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
|
56
|
-
|
|
114
|
+
| `reddit_search` | `GET /api/reddit/search` | Search posts across all of Reddit or within one subreddit (`subreddit`). |
|
|
115
|
+
| `reddit_search_comments` | `GET /api/reddit/search/comments` | Search by comment text; returns the parent posts, since Reddit's comment search does not hand back the matching comment itself. |
|
|
116
|
+
| `reddit_deep_comment_search` | `GET /api/reddit/search/comments/deep` | Genuine comment search: returns the actual matching comment bodies (score, author, comment-deep permalink, parent post). `limit` sets how many parent posts to expand; `group_by="author"` switches to research mode (the distinct people talking about your query). Premium call. |
|
|
117
|
+
| `reddit_search_media` | `GET /api/reddit/search/media` | Search posts filtered to media, narrowed by `kind` (`image`, `video`, `gif`, `all`). |
|
|
118
|
+
| `reddit_search_communities` | `GET /api/reddit/search/communities` | Find subreddits by name or topic (title, subscribers, description, NSFW flag). |
|
|
119
|
+
| `reddit_search_users` | `GET /api/reddit/search/users` | Find redditors by name or keyword (username, karma, account age). |
|
|
120
|
+
|
|
121
|
+
### Subreddits
|
|
122
|
+
|
|
123
|
+
| Tool | Endpoint | What it does |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| `reddit_subreddit_posts` | `GET /api/reddit/posts` | List a subreddit's posts by `sort` (`new`, `hot`, `top`, `rising`, `controversial`, `best`). |
|
|
126
|
+
| `reddit_subreddit_top` | `GET /api/reddit/sub/{name}/top` | Top posts of a subreddit for a time window (`t`). |
|
|
127
|
+
| `reddit_subreddit_comments` | `GET /api/reddit/sub/{name}/comments` | Stream the newest comments across an entire subreddit (not one post's thread). |
|
|
128
|
+
| `reddit_subreddit_about` | `GET /api/reddit/sub/{name}/about` | A subreddit's public metadata: title, description, subscriber and active-user counts, type, NSFW flag. |
|
|
129
|
+
| `reddit_subreddit_rules` | `GET /api/reddit/sub/{name}/rules` | A subreddit's posting rules plus Reddit's site-wide rules. |
|
|
130
|
+
| `reddit_subreddit_moderators` | `GET /api/reddit/sub/{name}/moderators` | A subreddit's moderator team, each with permissions, flair, and when they joined. |
|
|
131
|
+
| `reddit_subreddit_wiki` | `GET /api/reddit/sub/{name}/wiki/{page}` | A subreddit's wiki page by name and `page` (markdown + HTML, revision metadata). |
|
|
132
|
+
|
|
133
|
+
### Posts and comments
|
|
134
|
+
|
|
135
|
+
| Tool | Endpoint | What it does |
|
|
136
|
+
|---|---|---|
|
|
137
|
+
| `reddit_post` | `GET /api/reddit/post/{id}` | A single post by its base-36 `id` (no `t3_` prefix): title, author, score, text, permalink, subreddit, url. |
|
|
138
|
+
| `reddit_post_comments` | `GET /api/reddit/comments` | A post plus its full threaded comment tree, fetched by `permalink`. |
|
|
139
|
+
| `reddit_by_id` | `GET /api/reddit/by_id/{fullnames}` | Bulk-hydrate up to 100 posts in one call from a comma-separated list of `t3_` fullnames. |
|
|
140
|
+
|
|
141
|
+
### Users
|
|
142
|
+
|
|
143
|
+
| Tool | Endpoint | What it does |
|
|
144
|
+
|---|---|---|
|
|
145
|
+
| `reddit_user_profile` | `GET /api/reddit/user/{name}` | A user's public profile: karma, account age, verified/employee flags, avatar. |
|
|
146
|
+
| `reddit_user_comments` | `GET /api/reddit/user/{name}/comments` | A user's recent comments (body, score, subreddit, parent link, timestamp). |
|
|
147
|
+
| `reddit_user_submitted` | `GET /api/reddit/user/{name}/submitted` | A user's submitted posts (the sibling of `reddit_user_comments`). |
|
|
148
|
+
|
|
149
|
+
### Community browse (no keyword)
|
|
150
|
+
|
|
151
|
+
| Tool | Endpoint | What it does |
|
|
152
|
+
|---|---|---|
|
|
153
|
+
| `reddit_subreddits_popular` | `GET /api/reddit/subreddits/popular` | Browse the most-subscribed, trending subreddits right now. |
|
|
154
|
+
| `reddit_subreddits_new` | `GET /api/reddit/subreddits/new` | Browse the newest subreddits, most recently created first. |
|
|
155
|
+
| `reddit_subreddits_default` | `GET /api/reddit/subreddits/default` | Browse Reddit's default front-page set of subreddits. |
|
|
156
|
+
|
|
157
|
+
## Usage examples
|
|
158
|
+
|
|
159
|
+
### Research a topic across Reddit
|
|
160
|
+
|
|
161
|
+
> "What are people saying about the Rust borrow checker this month?"
|
|
162
|
+
|
|
163
|
+
The agent calls `reddit_search` with:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
q: "borrow checker"
|
|
167
|
+
sort: "top"
|
|
168
|
+
t: "month"
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Read a community's top posts of the week
|
|
172
|
+
|
|
173
|
+
> "Show me the top posts in r/programming this week."
|
|
174
|
+
|
|
175
|
+
The agent calls `reddit_subreddit_top` with:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
name: "programming"
|
|
179
|
+
t: "week"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
To page further, pass the `after` cursor from the response back on the next call: `{ name: "programming", t: "week", after: "<after from response>" }`.
|
|
183
|
+
|
|
184
|
+
### Find who is talking about a product
|
|
185
|
+
|
|
186
|
+
> "Which redditors are recommending mechanical keyboards, and what do they say?"
|
|
187
|
+
|
|
188
|
+
The agent calls `reddit_deep_comment_search` with:
|
|
189
|
+
|
|
190
|
+
```
|
|
191
|
+
q: "mechanical keyboard"
|
|
192
|
+
group_by: "author"
|
|
193
|
+
sort: "top"
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
Research mode returns the distinct people who mentioned the query, ranked by how many of their comments matched, each with their top comment and the subreddits they matched in.
|
|
197
|
+
|
|
198
|
+
### Vet a subreddit, then read a thread
|
|
199
|
+
|
|
200
|
+
> "Find a discussion about API rate limiting in r/webdev, check the sub's rules, and read the full thread."
|
|
201
|
+
|
|
202
|
+
The agent calls `reddit_search` scoped to the community:
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
q: "rate limiting"
|
|
206
|
+
subreddit: "webdev"
|
|
207
|
+
sort: "relevance"
|
|
208
|
+
t: "year"
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
Then `reddit_subreddit_rules` with `{ name: "webdev" }`, and finally `reddit_post_comments` with the `permalink` from a search result, for example `{ permalink: "/r/webdev/comments/abc123/some_title/" }`, to pull the post and its comment tree.
|
|
212
|
+
|
|
213
|
+
## Reads only, no session needed
|
|
214
|
+
|
|
215
|
+
Because this server exposes reads and nothing that writes, there is no account linking, login, or cookie step: your API key alone authorizes every call. Reddit write actions (posting, commenting, voting, sending DMs) are handled by a separate authenticated surface outside this package and are deliberately not exposed here, so an agent using this server cannot take an action on any account.
|
|
216
|
+
|
|
217
|
+
## Troubleshooting
|
|
218
|
+
|
|
219
|
+
**`HTTP 401 (invalid or missing API key)`** Check that `REDDITAPIS_KEY` is set correctly in your MCP client config and matches the key from [redditapis.com](https://www.redditapis.com).
|
|
220
|
+
|
|
221
|
+
**`HTTP 402 (insufficient credits)`** Top up your account at [redditapis.com](https://www.redditapis.com).
|
|
222
|
+
|
|
223
|
+
**`HTTP 403 (access forbidden)`** The subreddit or user may be private, banned, or quarantined, or your plan may not include this endpoint.
|
|
224
|
+
|
|
225
|
+
**`HTTP 404 (not found)`** The subreddit, post id, user, or permalink may be wrong or the content may have been deleted or removed.
|
|
226
|
+
|
|
227
|
+
**`HTTP 429 (rate limited)`** Wait a few seconds and retry, or reduce request frequency. For bulk work, space out calls and raise `REDDITAPIS_TIMEOUT_MS`.
|
|
228
|
+
|
|
229
|
+
**`Request failed: timed out after 30000ms`** The default timeout is 30 seconds. For large `reddit_deep_comment_search` or paginated fetches, set `REDDITAPIS_TIMEOUT_MS` higher (for example `60000`).
|
|
230
|
+
|
|
231
|
+
**Tools do not appear in Claude / Cursor** Ensure `npx` is on your PATH and Node.js 18+ is installed (`node --version`). Check your MCP client logs for startup errors.
|
|
57
232
|
|
|
58
233
|
## Development
|
|
59
234
|
|
|
60
235
|
```bash
|
|
61
236
|
npm install
|
|
62
|
-
npm run check # syntax
|
|
237
|
+
npm run check # syntax-check both source files
|
|
63
238
|
npm test # unit-test the tool catalog + query/path builders (no network)
|
|
64
239
|
npm start # run the stdio server (needs REDDITAPIS_KEY)
|
|
65
240
|
```
|
|
66
241
|
|
|
242
|
+
## Links
|
|
243
|
+
|
|
244
|
+
- Site and API keys: [redditapis.com](https://www.redditapis.com)
|
|
245
|
+
- REST API base URL (call it directly, without MCP): `https://api.redditapis.com`
|
|
246
|
+
|
|
247
|
+
## FAQ
|
|
248
|
+
|
|
249
|
+
**Do I need a Reddit developer account?** No. Get an API key at [redditapis.com](https://www.redditapis.com); there is no application or approval step.
|
|
250
|
+
|
|
251
|
+
**Can it post, comment, or vote?** No. This server is read-only. All 22 tools read Reddit; writes are a separate authenticated surface and are not exposed here.
|
|
252
|
+
|
|
253
|
+
**Which clients are supported?** Claude Desktop, Claude Code, Cursor, Windsurf, and VS Code (Copilot agent mode), or any Model Context Protocol client.
|
|
254
|
+
|
|
255
|
+
**Does it store my key or data?** No. The server holds no state and forwards your API key on each call.
|
|
256
|
+
|
|
67
257
|
## License
|
|
68
258
|
|
|
69
259
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "redditapis-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
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",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"src",
|
|
17
17
|
"README.md",
|
|
18
18
|
"LICENSE",
|
|
19
|
-
"CHANGELOG.md"
|
|
19
|
+
"CHANGELOG.md",
|
|
20
|
+
"smithery.yaml"
|
|
20
21
|
],
|
|
21
22
|
"engines": {
|
|
22
23
|
"node": ">=18"
|
|
@@ -37,7 +38,9 @@
|
|
|
37
38
|
"reddit-api",
|
|
38
39
|
"claude",
|
|
39
40
|
"cursor",
|
|
40
|
-
"redditapis"
|
|
41
|
+
"redditapis",
|
|
42
|
+
"modelcontextprotocol",
|
|
43
|
+
"ai-tools"
|
|
41
44
|
],
|
|
42
45
|
"author": "redditapis.com",
|
|
43
46
|
"license": "MIT",
|
package/smithery.yaml
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Smithery runtime config for redditapis-mcp.
|
|
2
|
+
# https://smithery.ai/docs/build/project-config
|
|
3
|
+
startCommand:
|
|
4
|
+
type: stdio
|
|
5
|
+
configSchema:
|
|
6
|
+
type: object
|
|
7
|
+
required:
|
|
8
|
+
- redditapisKey
|
|
9
|
+
properties:
|
|
10
|
+
redditapisKey:
|
|
11
|
+
type: string
|
|
12
|
+
title: RedditAPIs API key
|
|
13
|
+
description: Your redditapis.com API key. Get one at https://www.redditapis.com
|
|
14
|
+
redditapisBaseUrl:
|
|
15
|
+
type: string
|
|
16
|
+
title: API base URL
|
|
17
|
+
description: Optional. Defaults to https://api.redditapis.com
|
|
18
|
+
default: https://api.redditapis.com
|
|
19
|
+
commandFunction: |-
|
|
20
|
+
(config) => ({
|
|
21
|
+
command: 'node',
|
|
22
|
+
args: ['src/index.js'],
|
|
23
|
+
env: {
|
|
24
|
+
REDDITAPIS_KEY: config.redditapisKey,
|
|
25
|
+
...(config.redditapisBaseUrl ? { REDDITAPIS_BASE_URL: config.redditapisBaseUrl } : {}),
|
|
26
|
+
},
|
|
27
|
+
})
|
package/src/tools.js
CHANGED
|
@@ -84,7 +84,7 @@ export const TOOLS = [
|
|
|
84
84
|
name: "reddit_search",
|
|
85
85
|
path: "/api/reddit/search",
|
|
86
86
|
description:
|
|
87
|
-
"Search Reddit posts across all of Reddit or within one subreddit. Returns matching posts with author, score, comments, permalink, and an `after` cursor. Use for topic/keyword research, brand monitoring, or finding discussions. Scope to a community with `subreddit`. Example: q='rust vs go' sort='top' t='year'.",
|
|
87
|
+
"Search Reddit posts across all of Reddit or within one subreddit. Returns matching posts with author, score, comments, permalink, and an `after` cursor. Use for topic/keyword research, brand monitoring, or finding discussions. Scope to a community with `subreddit`. Optional advanced filters narrow the results by minimum/maximum score, comment count, media type, and post flags, with an optional re-sort of the page. Because filters are applied to the returned page, the response then carries a `meta` object with page-completeness counts, so a filtered result is never mistaken for the whole set; paginate with `after` to filter more. Example: q='rust vs go' sort='top' t='year'.",
|
|
88
88
|
shape: {
|
|
89
89
|
...QUERY,
|
|
90
90
|
subreddit: z.string().optional().describe(
|
|
@@ -95,6 +95,18 @@ export const TOOLS = [
|
|
|
95
95
|
...AFTER,
|
|
96
96
|
...NSFW,
|
|
97
97
|
...LIMIT,
|
|
98
|
+
min_score: z.number().int().optional().describe("Keep only posts with score >= this (applied to the returned page)."),
|
|
99
|
+
max_score: z.number().int().optional().describe("Keep only posts with score <= this."),
|
|
100
|
+
min_comments: z.number().int().optional().describe("Keep only posts with comment count >= this."),
|
|
101
|
+
max_comments: z.number().int().optional().describe("Keep only posts with comment count <= this."),
|
|
102
|
+
is_video: z.boolean().optional().describe("true = only video posts, false = only non-video."),
|
|
103
|
+
is_self: z.boolean().optional().describe("true = only self/text posts, false = only link posts."),
|
|
104
|
+
over_18: z.boolean().optional().describe("Filter the page by NSFW flag (distinct from nsfw, which controls inclusion in the search)."),
|
|
105
|
+
locked: z.boolean().optional().describe("Filter by the locked flag."),
|
|
106
|
+
stickied: z.boolean().optional().describe("Filter by the stickied flag."),
|
|
107
|
+
spoiler: z.boolean().optional().describe("Filter by the spoiler flag."),
|
|
108
|
+
contest_mode: z.boolean().optional().describe("Filter by the contest_mode flag."),
|
|
109
|
+
sort_type: z.enum(["score", "num_comments", "created"]).optional().describe("Re-sort the filtered page (descending) by this field."),
|
|
98
110
|
},
|
|
99
111
|
},
|
|
100
112
|
{
|
|
@@ -271,6 +283,31 @@ export const TOOLS = [
|
|
|
271
283
|
),
|
|
272
284
|
},
|
|
273
285
|
},
|
|
286
|
+
{
|
|
287
|
+
name: "reddit_subreddit_moderators",
|
|
288
|
+
path: "/api/reddit/sub/{name}/moderators",
|
|
289
|
+
description:
|
|
290
|
+
"Fetch a subreddit's moderator team by name (Reddit's /r/<name>/about/moderators data). Returns a `moderators` list, each with `name`, `id`, `mod_permissions`, `flair_text`, and `added` (when they joined the mod team). Use it to see who moderates a community. Example: name='python'.",
|
|
291
|
+
shape: {
|
|
292
|
+
name: z.string().min(1).describe(
|
|
293
|
+
"Subreddit name WITHOUT the r/ prefix (e.g. 'python'). Required (path parameter).",
|
|
294
|
+
),
|
|
295
|
+
},
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
name: "reddit_subreddit_wiki",
|
|
299
|
+
path: "/api/reddit/sub/{name}/wiki/{page}",
|
|
300
|
+
description:
|
|
301
|
+
"Fetch a subreddit's wiki page by name and page (Reddit's /r/<name>/wiki/<page> data). Returns a single object with `content_md` and `content_html`, a `may_revise` flag, and the last revision (`revision_id`, `revision_date`, `revised_by`, `reason`). Use it to read a community's wiki, such as its rules or FAQ. The page may be multi-segment, for example index, rules, or config/sidebar. Example: name='python', page='index'.",
|
|
302
|
+
shape: {
|
|
303
|
+
name: z.string().min(1).describe(
|
|
304
|
+
"Subreddit name WITHOUT the r/ prefix (e.g. 'python'). Required (path parameter).",
|
|
305
|
+
),
|
|
306
|
+
page: z.string().min(1).describe(
|
|
307
|
+
"Wiki page name (e.g. 'index'). Required (path parameter). May be multi-segment like 'config/sidebar'.",
|
|
308
|
+
),
|
|
309
|
+
},
|
|
310
|
+
},
|
|
274
311
|
{
|
|
275
312
|
name: "reddit_by_id",
|
|
276
313
|
path: "/api/reddit/by_id/{fullnames}",
|