reddit_get_user
Retrieve a Reddit user's recent public posts and comments to analyze their activity and contributions across the platform.
Instructions
Get a Reddit user's recent public activity (posts and comments).
Args: username: Reddit username without u/ prefix (e.g., 'spez', 'GallowBoob') limit: Maximum number of activity items (default: 25, max: 100)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | ||
| limit | No |
Implementation Reference
- Implementation of the 'reddit_get_user' MCP tool, which delegates to the user_service and handles serialization and errors.
@mcp.tool( name="reddit_get_user", description=( "Get a Reddit user's recent public activity " "(posts and comments).\n\n" "Args:\n" " username: Reddit username without u/ prefix " "(e.g., 'spez', 'GallowBoob')\n" " limit: Maximum number of activity items " "(default: 25, max: 100)" ), ) async def reddit_get_user( username: str, ctx: Context, limit: int = 25, ) -> list[dict[str, Any]]: try: results = await service.get_user(username, limit=limit) return McpSerializer.serialize_list(results) except Exception as e: McpErrorMapper.map(e, "reddit_get_user")