Skip to main content
Glama
Arindam200

Reddit MCP Server

search_posts

Find Reddit posts by searching with keywords, filtering by subreddit, sorting by relevance or time, and controlling result quantity.

Instructions

Search for Reddit posts using a search query.

Args:
    query: The search query/term to search for
    subreddit: Optional subreddit to limit search to (with or without 'r/' prefix). If None, searches all of Reddit
    sort: Sort order for results - one of: "relevance", "hot", "top", "new", "comments"
    time_filter: Time period to filter results (e.g. "hour", "day", "week", "month", "year", "all")
    limit: Number of posts to return (1-100)

Returns:
    Dictionary containing structured search results with the following structure:
    {
        'query': str,  # The search query used
        'subreddit': Optional[str],  # Subreddit searched (None if searching all of Reddit)
        'sort': str,  # Sort method used
        'time_filter': str,  # Time filter used
        'posts': [  # List of matching posts
            {
                'id': str,  # Post ID
                'title': str,  # Post title
                'author': str,  # Author's username
                'subreddit': str,  # Subreddit name
                'score': int,  # Post score (upvotes - downvotes)
                'upvote_ratio': float,  # Ratio of upvotes to total votes
                'num_comments': int,  # Number of comments
                'created_utc': float,  # Post creation timestamp
                'url': str,  # URL to the post
                'permalink': str,  # Relative URL to the post
                'is_self': bool,  # Whether it's a self (text) post
                'selftext': str,  # Content of self post (if any)
                'link_url': str,  # URL for link posts (if any)
                'over_18': bool,  # Whether marked as NSFW
                'spoiler': bool,  # Whether marked as spoiler
                'stickied': bool,  # Whether stickied in the subreddit
                'locked': bool,  # Whether comments are locked
                'distinguished': Optional[str],  # Distinguishing type (e.g., 'moderator')
                'flair': Optional[Dict],  # Post flair information if any
            },
            ...
        ],
        'metadata': {
            'fetched_at': float,  # Timestamp when data was fetched
            'result_count': int,  # Number of results returned
            'search_scope': str,  # "all" or subreddit name
        }
    }

Raises:
    ValueError: If query is empty, sort method is invalid, or time_filter is invalid
    RuntimeError: For other errors during the operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
subredditNo
sortNorelevance
time_filterNoall
limitNo
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes the tool's behavior: it performs a search operation (implying read-only, non-destructive), specifies error conditions ('Raises: ValueError, RuntimeError'), and details the return structure. This provides comprehensive behavioral context beyond basic functionality.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (Args, Returns, Raises) and efficiently explains parameters and return values. However, it could be more front-loaded; the core purpose is stated first, but the detailed parameter explanations follow immediately, making it slightly dense. Every sentence earns its place, but some redundancy exists in explaining the return dictionary structure.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no annotations, no output schema, and 0% schema description coverage, the description is highly complete. It covers purpose, all parameters with semantics, detailed return structure, and error conditions. This provides the agent with all necessary information to correctly invoke and interpret results from this search tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Given 0% schema description coverage, the description fully compensates by explaining all 5 parameters in detail. It clarifies semantics such as optional subreddit filtering, sort options, time filter meanings, and limit range. This adds significant value beyond the bare schema, which only lists parameter names and types without context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Search for Reddit posts using a search query.' It specifies the verb ('search') and resource ('Reddit posts'), but does not explicitly differentiate from sibling tools like 'get_top_posts' or 'get_submission_by_id', which also retrieve posts. The purpose is clear but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through parameter explanations (e.g., 'If None, searches all of Reddit'), but does not explicitly state when to use this tool versus alternatives like 'get_top_posts' for non-search-based retrieval or 'get_submission_by_id' for specific posts. It provides context for parameter choices but lacks direct guidance on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Arindam200/reddit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server