reddit-automation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseReddit Automation via Rube MCP
通过Rube MCP实现Reddit自动化
Automate Reddit operations through Composio's Reddit toolkit via Rube MCP.
通过Composio的Reddit工具包,借助Rube MCP实现Reddit操作自动化。
Prerequisites
前提条件
- Rube MCP must be connected (RUBE_SEARCH_TOOLS available)
- Active Reddit connection via with toolkit
RUBE_MANAGE_CONNECTIONSreddit - Always call first to get current tool schemas
RUBE_SEARCH_TOOLS
- 必须已连接Rube MCP(需提供RUBE_SEARCH_TOOLS)
- 通过并使用工具包
RUBE_MANAGE_CONNECTIONS建立有效的Reddit连接reddit - 请始终先调用以获取最新的工具架构
RUBE_SEARCH_TOOLS
Setup
设置步骤
Get Rube MCP: Add as an MCP server in your client configuration. No API keys needed — just add the endpoint and it works.
https://rube.app/mcp- Verify Rube MCP is available by confirming responds
RUBE_SEARCH_TOOLS - Call with toolkit
RUBE_MANAGE_CONNECTIONSreddit - If connection is not ACTIVE, follow the returned auth link to complete Reddit OAuth
- Confirm connection status shows ACTIVE before running any workflows
获取Rube MCP:在客户端配置中添加作为MCP服务器。无需API密钥——只需添加该端点即可使用。
https://rube.app/mcp- 通过确认能正常响应,验证Rube MCP是否可用
RUBE_SEARCH_TOOLS - 调用并指定工具包
RUBE_MANAGE_CONNECTIONSreddit - 如果连接状态未显示为ACTIVE,请按照返回的认证链接完成Reddit OAuth授权
- 在运行任何工作流之前,确认连接状态显示为ACTIVE
Core Workflows
核心工作流
1. Search Reddit
1. 搜索Reddit内容
When to use: User wants to find posts across subreddits
Tool sequence:
- - Search for posts matching a query [Required]
REDDIT_SEARCH_ACROSS_SUBREDDITS
Key parameters:
- : Search terms
query - : Limit search to a specific subreddit (optional)
subreddit - : Sort results by 'relevance', 'hot', 'top', 'new', 'comments'
sort - : Time range ('hour', 'day', 'week', 'month', 'year', 'all')
time_filter - : Number of results to return
limit
Pitfalls:
- Search results may not include very recent posts due to indexing delay
- The parameter only works with certain sort options
time_filter - Results are paginated; use after/before tokens for additional pages
- NSFW content may be filtered based on account settings
适用场景:用户需要在多个子版块中查找帖子
工具执行顺序:
- - 搜索匹配指定关键词的帖子 [必填]
REDDIT_SEARCH_ACROSS_SUBREDDITS
关键参数:
- :搜索关键词
query - :限制搜索范围到特定子版块(可选)
subreddit - :结果排序方式,可选'relevance'(相关性)、'hot'(热门)、'top'(置顶)、'new'(最新)、'comments'(评论数)
sort - :时间范围,可选'hour'(小时)、'day'(天)、'week'(周)、'month'(月)、'year'(年)、'all'(全部)
time_filter - :返回结果的数量
limit
注意事项:
- 由于索引延迟,搜索结果可能不包含最新发布的帖子
- 参数仅对部分排序选项生效
time_filter - 结果采用分页机制;使用after/before令牌获取下一页/上一页内容
- 根据账户设置,NSFW内容可能会被过滤
2. Create Posts
2. 创建帖子
When to use: User wants to submit a new post to a subreddit
Tool sequence:
- - Get available post flairs [Optional]
REDDIT_LIST_SUBREDDIT_POST_FLAIRS - - Submit the post [Required]
REDDIT_CREATE_REDDIT_POST
Key parameters:
- : Target subreddit name (without 'r/' prefix)
subreddit - : Post title
title - : Post body text (for text posts)
text - : Link URL (for link posts)
url - : Flair ID from the subreddit's flair list
flair_id
Pitfalls:
- Some subreddits require flair; use LIST_SUBREDDIT_POST_FLAIRS first
- Subreddit posting rules vary widely; karma/age restrictions may apply
- Text and URL are mutually exclusive; a post is either text or link
- Rate limits apply; avoid rapid successive post creation
- The subreddit name should not include 'r/' prefix
适用场景:用户需要在子版块中发布新帖子
工具执行顺序:
- - 获取可用的帖子标签 [可选]
REDDIT_LIST_SUBREDDIT_POST_FLAIRS - - 提交帖子 [必填]
REDDIT_CREATE_REDDIT_POST
关键参数:
- :目标子版块名称(无需添加'r/'前缀)
subreddit - :帖子标题
title - :帖子正文内容(仅适用于纯文本帖子)
text - :链接地址(仅适用于链接类帖子)
url - :从子版块标签列表中获取的标签ID
flair_id
注意事项:
- 部分子版块要求必须添加标签;请先调用LIST_SUBREDDIT_POST_FLAIRS获取标签
- 不同子版块的发帖规则差异较大;可能存在 karma/账号注册时长限制
- 纯文本和链接类型不可同时选择;一个帖子只能是纯文本或链接类
- 存在频率限制;避免短时间内连续发布帖子
- 子版块名称请勿添加'r/'前缀
3. Manage Comments
3. 管理评论
When to use: User wants to comment on posts or manage existing comments
Tool sequence:
- - Get comments on a post [Optional]
REDDIT_RETRIEVE_POST_COMMENTS - - Add a comment to a post or reply to a comment [Required]
REDDIT_POST_REDDIT_COMMENT - - Edit an existing comment [Optional]
REDDIT_EDIT_REDDIT_COMMENT_OR_POST - - Delete a comment [Optional]
REDDIT_DELETE_REDDIT_COMMENT
Key parameters:
- : ID of the post (for retrieving or commenting on)
post_id - : Full name of the parent (e.g., 't3_abc123' for post, 't1_xyz789' for comment)
parent_id - : Comment text content
body - : Full name of the item to edit or delete
thing_id
Pitfalls:
- Reddit uses 'fullname' format: 't1_' prefix for comments, 't3_' for posts
- Editing replaces the entire comment body; include all desired content
- Deleted comments show as '[deleted]' but the tree structure remains
- Comment depth limits may apply in some subreddits
适用场景:用户需要在帖子下发表评论或管理已有评论
工具执行顺序:
- - 获取帖子下的评论 [可选]
REDDIT_RETRIEVE_POST_COMMENTS - - 在帖子下发表评论或回复已有评论 [必填]
REDDIT_POST_REDDIT_COMMENT - - 编辑已有评论 [可选]
REDDIT_EDIT_REDDIT_COMMENT_OR_POST - - 删除评论 [可选]
REDDIT_DELETE_REDDIT_COMMENT
关键参数:
- :帖子ID(用于获取评论或发表评论)
post_id - :父项的完整名称(例如,帖子为't3_abc123',评论为't1_xyz789')
parent_id - :评论内容
body - :待编辑或删除的项目的完整名称
thing_id
注意事项:
- Reddit使用“完整名称”格式:评论前缀为't1_',帖子前缀为't3_'
- 编辑操作会替换整个评论内容;请包含所有需要保留的内容
- 删除后的评论会显示为'[deleted]',但评论的层级结构仍会保留
- 部分子版块可能对评论的层级深度有限制
4. Browse Subreddit Content
4. 浏览子版块内容
When to use: User wants to view top or trending content from a subreddit
Tool sequence:
- - Get top posts from a subreddit [Required]
REDDIT_GET_R_TOP - - Get posts from a subreddit endpoint [Alternative]
REDDIT_GET - - Get full details for a specific post [Optional]
REDDIT_RETRIEVE_REDDIT_POST
Key parameters:
- : Subreddit name
subreddit - : Time range for top posts ('hour', 'day', 'week', 'month', 'year', 'all')
time_filter - : Number of posts to retrieve
limit - : Specific post ID for full details
post_id
Pitfalls:
- Top posts with time_filter='all' returns all-time top content
- Post details include the body text but comments require a separate call
- Some posts may be removed or hidden based on subreddit rules
- NSFW posts are included unless filtered at the account level
适用场景:用户需要查看子版块中的热门或趋势内容
工具执行顺序:
- - 获取子版块中的热门帖子 [必填]
REDDIT_GET_R_TOP - - 从子版块端点获取帖子 [替代方案]
REDDIT_GET - - 获取特定帖子的完整详情 [可选]
REDDIT_RETRIEVE_REDDIT_POST
关键参数:
- :子版块名称
subreddit - :热门帖子的时间范围(可选'hour'、'day'、'week'、'month'、'year'、'all')
time_filter - :要获取的帖子数量
limit - :特定帖子的ID(用于获取完整详情)
post_id
注意事项:
- 当time_filter='all'时,热门帖子会返回该子版块的历史热门内容
- 帖子详情包含正文内容,但评论需要单独调用接口获取
- 部分帖子可能会根据子版块规则被移除或隐藏
- 除非账户设置过滤,否则NSFW帖子会被包含在内
5. Manage Posts
5. 管理帖子
When to use: User wants to edit or delete their own posts
Tool sequence:
- - Edit a post's text content [Optional]
REDDIT_EDIT_REDDIT_COMMENT_OR_POST - - Delete a post [Optional]
REDDIT_DELETE_REDDIT_POST - - Get user's flair in a subreddit [Optional]
REDDIT_GET_USER_FLAIR
Key parameters:
- : Full name of the post (e.g., 't3_abc123')
thing_id - : New text content (for editing)
body - : Subreddit name (for flair)
subreddit
Pitfalls:
- Only text posts can have their body edited; link posts cannot be modified
- Post titles cannot be edited after submission
- Deletion is permanent; deleted posts show as '[deleted]'
- User flair is per-subreddit and may be restricted
适用场景:用户需要编辑或删除自己发布的帖子
工具执行顺序:
- - 编辑帖子的正文内容 [可选]
REDDIT_EDIT_REDDIT_COMMENT_OR_POST - - 删除帖子 [可选]
REDDIT_DELETE_REDDIT_POST - - 获取用户在子版块中的身份标签 [可选]
REDDIT_GET_USER_FLAIR
关键参数:
- :帖子的完整名称(例如't3_abc123')
thing_id - :新的正文内容(用于编辑)
body - :子版块名称(用于获取身份标签)
subreddit
注意事项:
- 只有纯文本帖子可以编辑正文;链接类帖子无法修改
- 帖子标题提交后无法编辑
- 删除操作是永久性的;删除后的帖子会显示为'[deleted]'
- 用户身份标签是子版块专属的,可能存在使用限制
Common Patterns
常见模式
Reddit Fullname Format
Reddit完整名称格式
Prefixes:
t1_ = Comment (e.g., 't1_abc123')
t2_ = Account (e.g., 't2_xyz789')
t3_ = Post/Link (e.g., 't3_def456')
t4_ = Message
t5_ = SubredditUsage:
1. Retrieve a post to get its fullname (t3_XXXXX)
2. Use fullname as parent_id when commenting
3. Use fullname as thing_id when editing/deleting前缀说明:
t1_ = 评论(例如't1_abc123')
t2_ = 账户(例如't2_xyz789')
t3_ = 帖子/链接(例如't3_def456')
t4_ = 消息
t5_ = 子版块使用方式:
1. 获取帖子以获取其完整名称(t3_XXXXX)
2. 发表评论时,将完整名称作为parent_id使用
3. 编辑/删除时,将完整名称作为thing_id使用Pagination
分页机制
- Reddit uses cursor-based pagination with 'after' and 'before' tokens
- Set for items per page (max 100)
limit - Check response for token
after - Pass value in subsequent requests to get next page
after
- Reddit采用基于游标分页方式,使用'after'和'before'令牌
- 设置参数指定每页的项目数量(最大100)
limit - 检查响应中的令牌
after - 在后续请求中传入值以获取下一页内容
after
Flair Resolution
标签获取流程
1. Call REDDIT_LIST_SUBREDDIT_POST_FLAIRS with subreddit name
2. Find matching flair by text or category
3. Extract flair_id
4. Include flair_id when creating the post1. 调用REDDIT_LIST_SUBREDDIT_POST_FLAIRS并传入子版块名称
2. 根据文本或类别找到匹配的标签
3. 提取flair_id
4. 创建帖子时包含flair_id参数Known Pitfalls
已知注意事项
Rate Limits:
- Reddit enforces rate limits per account and per OAuth app
- Posting is limited to approximately 1 post per 10 minutes for new accounts
- Commenting has similar but less restrictive limits
- 429 errors should trigger exponential backoff
Content Rules:
- Each subreddit has its own posting rules and requirements
- Some subreddits are restricted or private
- Karma requirements may prevent posting in certain subreddits
- Auto-moderator rules may remove posts that match certain patterns
ID Formats:
- Always use fullname format (with prefix) for parent_id and thing_id
- Raw IDs without prefix will cause 'Invalid ID' errors
- Post IDs from search results may need 't3_' prefix added
Text Formatting:
- Reddit uses Markdown for post and comment formatting
- Code blocks, tables, and headers are supported
- Links use format
[text](url) - Mention users with , subreddits with
u/usernamer/subreddit
频率限制:
- Reddit针对每个账户和OAuth应用设置了频率限制
- 新账户的发帖限制约为每10分钟1篇
- 评论的限制类似但相对宽松
- 遇到429错误时,应采用指数退避策略重试
内容规则:
- 每个子版块都有自己的发帖规则和要求
- 部分子版块是受限或私密的
- 部分子版块可能要求达到一定的Karma值才能发帖
- 自动moderator规则可能会移除符合特定模式的帖子
ID格式:
- parent_id和thing_id必须使用带前缀的完整名称格式
- 不带前缀的原始ID会导致“无效ID”错误
- 搜索结果中的帖子ID可能需要添加't3_'前缀
文本格式:
- Reddit的帖子和评论支持Markdown格式
- 支持代码块、表格和标题
- 链接格式为
[文本](链接地址) - 提及用户使用,提及子版块使用
u/用户名r/子版块名称
Quick Reference
快速参考
| Task | Tool Slug | Key Params |
|---|---|---|
| Search Reddit | REDDIT_SEARCH_ACROSS_SUBREDDITS | query, subreddit, sort, time_filter |
| Create post | REDDIT_CREATE_REDDIT_POST | subreddit, title, text/url |
| Get post comments | REDDIT_RETRIEVE_POST_COMMENTS | post_id |
| Add comment | REDDIT_POST_REDDIT_COMMENT | parent_id, body |
| Edit comment/post | REDDIT_EDIT_REDDIT_COMMENT_OR_POST | thing_id, body |
| Delete comment | REDDIT_DELETE_REDDIT_COMMENT | thing_id |
| Delete post | REDDIT_DELETE_REDDIT_POST | thing_id |
| Get top posts | REDDIT_GET_R_TOP | subreddit, time_filter, limit |
| Browse subreddit | REDDIT_GET | subreddit |
| Get post details | REDDIT_RETRIEVE_REDDIT_POST | post_id |
| Get specific comment | REDDIT_RETRIEVE_SPECIFIC_COMMENT | comment_id |
| List post flairs | REDDIT_LIST_SUBREDDIT_POST_FLAIRS | subreddit |
| Get user flair | REDDIT_GET_USER_FLAIR | subreddit |
| 任务 | 工具标识 | 关键参数 |
|---|---|---|
| 搜索Reddit内容 | REDDIT_SEARCH_ACROSS_SUBREDDITS | query, subreddit, sort, time_filter |
| 创建帖子 | REDDIT_CREATE_REDDIT_POST | subreddit, title, text/url |
| 获取帖子评论 | REDDIT_RETRIEVE_POST_COMMENTS | post_id |
| 发表评论 | REDDIT_POST_REDDIT_COMMENT | parent_id, body |
| 编辑评论/帖子 | REDDIT_EDIT_REDDIT_COMMENT_OR_POST | thing_id, body |
| 删除评论 | REDDIT_DELETE_REDDIT_COMMENT | thing_id |
| 删除帖子 | REDDIT_DELETE_REDDIT_POST | thing_id |
| 获取热门帖子 | REDDIT_GET_R_TOP | subreddit, time_filter, limit |
| 浏览子版块内容 | REDDIT_GET | subreddit |
| 获取帖子详情 | REDDIT_RETRIEVE_REDDIT_POST | post_id |
| 获取特定评论 | REDDIT_RETRIEVE_SPECIFIC_COMMENT | comment_id |
| 列出帖子标签 | REDDIT_LIST_SUBREDDIT_POST_FLAIRS | subreddit |
| 获取用户身份标签 | REDDIT_GET_USER_FLAIR | subreddit |