Skip to main content
Glama
eliasbiondo

Reddit MCP Server

by eliasbiondo

reddit_get_subreddit_posts

Fetch posts from any Reddit subreddit by specifying category, time filter, and quantity limits to gather community discussions.

Instructions

Get posts from a subreddit listing.

Args: subreddit: Subreddit name without r/ prefix (e.g., 'Python', 'news') limit: Maximum number of posts (default: 25, max: 100) category: Listing category (hot, top, new, rising). Default: hot time_filter: Time window for top listings (hour, day, week, month, year, all). Default: all

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subredditYes
limitNo
categoryNo
time_filterNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The handler function for 'reddit_get_subreddit_posts' which uses the PostService to fetch posts and serializes the response.
    async def reddit_get_subreddit_posts(
        subreddit: str,
        ctx: Context,
        limit: int = 25,
        category: str | None = None,
        time_filter: str | None = None,
    ) -> list[dict[str, Any]]:
        try:
            results = await service.get_subreddit_posts(
                subreddit, limit=limit, category=category, time_filter=time_filter
            )
            return McpSerializer.serialize_list(results)
        except Exception as e:
            McpErrorMapper.map(e, "reddit_get_subreddit_posts")
  • Registration of the 'reddit_get_subreddit_posts' tool with its description and arguments using FastMCP.
    @mcp.tool(
        name="reddit_get_subreddit_posts",
        description=(
            "Get posts from a subreddit listing.\n\n"
            "Args:\n"
            "    subreddit: Subreddit name without r/ prefix (e.g., 'Python', 'news')\n"
            "    limit: Maximum number of posts (default: 25, max: 100)\n"
            "    category: Listing category (hot, top, new, rising). Default: hot\n"
            "    time_filter: Time window for top listings "
            "(hour, day, week, month, year, all). Default: all"
        ),
    )
Behavior3/5

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

With zero annotations, the description carries the full disclosure burden. It provides useful behavioral constraints (max 100 posts, default values, category options) and notes the time_filter applies only to 'top' listings. However, it omits authentication requirements, rate limits, read-only safety confirmation, or pagination behavior.

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?

Well-structured with purpose front-loaded in the first sentence followed by an Args block. While the Args block is lengthy, it is necessary given the empty schema. No wasted sentences; every line provides essential parameter documentation.

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

Completeness3/5

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

Adequate for the tool's complexity given the output schema exists (covering return values). Parameter documentation is complete, but the description lacks operational context like API authentication requirements or rate limiting, which is crucial given no annotations are provided.

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?

Excellent compensation for 0% schema coverage. Documents all 4 parameters with concrete examples ('Python', 'news'), enum values (hot/top/new/rising), value constraints (max: 100), and formatting rules (without r/ prefix). This adds essential semantic meaning completely absent from the schema.

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?

States specific verb+resource ('Get posts from a subreddit listing') and implies bulk retrieval via 'listing', which distinguishes it from sibling 'reddit_get_post' (likely single post). However, it doesn't explicitly contrast with other siblings like 'reddit_search' or 'reddit_get_user_posts'.

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

Usage Guidelines2/5

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

Provides no explicit guidance on when to use this tool versus siblings (e.g., when to use this vs reddit_search for finding posts). The only usage hint is implicit in the time_filter description noting it applies to 'top listings', but lacks 'when-not' or alternative recommendations.

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