Skip to main content
Glama
eliasbiondo

Reddit MCP Server

by eliasbiondo

reddit_search

Search Reddit posts by keywords to find relevant discussions, with options to filter results by sort order and limit the number of posts returned.

Instructions

Search all of Reddit for posts matching a query.

Args: query: Search keywords (e.g., 'python web scraping', 'machine learning') limit: Maximum number of results to return (default: 25, max: 100) sort: Sort order for results (relevance, hot, top, new, comments)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
limitNo
sortNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The reddit_search tool handler implementation, which calls the search service and serializes the result.
    async def reddit_search(
        query: str,
        ctx: Context,
        limit: int = 25,
        sort: str | None = None,
    ) -> list[dict[str, Any]]:
        try:
            results = await service.search(query, limit=limit, sort=sort)
            return McpSerializer.serialize_list(results)
        except Exception as e:
            McpErrorMapper.map(e, "reddit_search")
  • The registration of the reddit_search tool using FastMCP.
    @mcp.tool(
        name="reddit_search",
        description=(
            "Search all of Reddit for posts matching a query.\n\n"
            "Args:\n"
            "    query: Search keywords "
            "(e.g., 'python web scraping', 'machine learning')\n"
            "    limit: Maximum number of results to return "
            "(default: 25, max: 100)\n"
            "    sort: Sort order for results "
            "(relevance, hot, top, new, comments)"
        ),
    )
Behavior3/5

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

With no annotations provided, the description must carry full behavioral burden. It discloses the maximum results limit (100) and available sort options, which is helpful. However, it omits rate limiting information, authentication requirements, and pagination behavior details that would be valuable for a search API tool.

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?

Efficient three-part structure: purpose statement followed by Args documentation. Every sentence provides value. The Args format is slightly rigid compared to prose, but remains highly readable and wastes no words.

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

Completeness4/5

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

Given the simple 3-parameter schema, presence of output schema, and clear scope definition, the description provides sufficient context. It appropriately delegates return value details to the output schema while covering search scope and parameter semantics adequately.

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?

With 0% schema description coverage, the description fully compensates by documenting all three parameters in the Args section: query includes concrete examples ('python web scraping'), limit specifies constraints (default: 25, max: 100), and sort enumerates valid options (relevance, hot, top, etc.).

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

Purpose5/5

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

Clear specific verb ('Search'), resource ('Reddit/posts'), and scope ('all of Reddit'). The phrase 'all of Reddit' effectively distinguishes this from sibling subreddit-specific tools like reddit_search_subreddit and reddit_get_subreddit_posts.

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?

Provides implied usage through scope specification ('all of Reddit'), allowing inference that this is for global searches versus subreddit-specific queries. However, lacks explicit 'when to use' guidance comparing it to reddit_search_subreddit or prerequisites like query formatting requirements.

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/eliasbiondo/reddit-mcp-server'

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