Skip to main content
Glama
Hawstein

MCP Server Reddit

by Hawstein

get_subreddit_info

Retrieve details about any Reddit community, including description, subscriber count, and rules, to understand its purpose and content.

Instructions

Get information about a subreddit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
subreddit_nameYesName of the subreddit (e.g. 'Python', 'news')

Implementation Reference

  • The handler function in the RedditServer class that fetches and returns subreddit information using the redditwarp client.
    def get_subreddit_info(self, subreddit_name: str) -> SubredditInfo:
        """Get information about a subreddit"""
        subr = self.client.p.subreddit.fetch_by_name(subreddit_name)
        return SubredditInfo(
            name=subr.name,
            subscriber_count=subr.subscriber_count,
            description=subr.public_description
        )
  • Pydantic model defining the structure of the subreddit information output.
    class SubredditInfo(BaseModel):
        name: str
        subscriber_count: int
        description: str | None
  • Tool registration in list_tools(), defining the tool name, description, and input schema.
    Tool(
        name=RedditTools.GET_SUBREDDIT_INFO.value,
        description="Get information about a subreddit",
        inputSchema={
            "type": "object",
            "properties": {
                "subreddit_name": {
                    "type": "string",
                    "description": "Name of the subreddit (e.g. 'Python', 'news')",
                }
            },
            "required": ["subreddit_name"]
        }
    ),
  • Dispatch logic in call_tool() that handles arguments and invokes the handler.
    case RedditTools.GET_SUBREDDIT_INFO.value:
        subreddit_name = arguments.get("subreddit_name")
        if not subreddit_name:
            raise ValueError("Missing required argument: subreddit_name")
        result = reddit_server.get_subreddit_info(subreddit_name)
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action but doesn't cover critical aspects like whether this is a read-only operation, potential rate limits, authentication needs, error conditions, or what specific information is returned (e.g., description, subscriber count). This leaves significant gaps for safe and effective use.

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

Conciseness5/5

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

The description is a single, efficient sentence that directly states the tool's purpose without any fluff or redundancy. It's appropriately sized and front-loaded, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete for a tool that likely returns structured data about a subreddit. It doesn't explain what 'information' includes (e.g., metadata, rules, stats), leaving the agent uncertain about the tool's output and how to use it effectively in context.

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

Parameters3/5

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

The input schema has 100% description coverage, with the parameter 'subreddit_name' clearly documented in the schema itself. The description adds no additional parameter details beyond what the schema provides, so it meets the baseline of 3 for adequate but minimal value in this dimension.

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 verb ('Get') and resource ('information about a subreddit'), making the purpose immediately understandable. However, it doesn't distinguish this tool from its siblings (e.g., 'get_subreddit_hot_posts'), which all involve retrieving subreddit-related data but serve different purposes.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'get_subreddit_hot_posts' that also retrieve subreddit data, there's no indication that this tool is for general metadata versus post listings, leaving the agent to guess based on the name alone.

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

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