Skip to main content
Glama
liuyang1520

Reddit MCP Server

by liuyang1520

get_user_info

Retrieve profile data for a Reddit user, including account details, activity statistics, and posting history.

Instructions

Get information about a Reddit user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usernameYesReddit username (without u/ prefix)

Implementation Reference

  • Core handler function that makes the Reddit API request to fetch user information and maps the response to a RedditUser object.
    async getUserInfo(username: string): Promise<RedditUser> {
      const data = await this.makeRequest(`/user/${username}/about`);
      return this.mapUser(data.data);
    }
  • Zod schema for validating the input parameters (username) of the get_user_info tool.
    const GetUserInfoSchema = z.object({
      username: z.string().min(1, "Username is required"),
    });
  • src/index.ts:164-177 (registration)
    Tool registration in the listTools response, defining name, description, and input schema.
    {
      name: 'get_user_info',
      description: 'Get information about a Reddit user',
      inputSchema: {
        type: 'object',
        properties: {
          username: {
            type: 'string',
            description: 'Reddit username (without u/ prefix)',
          },
        },
        required: ['username'],
      },
    },
  • MCP CallToolRequest handler case that parses arguments, calls the RedditClient method, and formats the response.
    case 'get_user_info': {
      const args = GetUserInfoSchema.parse(request.params.arguments);
      const user = await redditClient.getUserInfo(args.username);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(user, null, 2),
          },
        ],
      };
    }
  • Helper function to map raw Reddit API user data to the standardized RedditUser interface.
    private mapUser(data: any): RedditUser {
      return {
        name: data.name,
        id: data.id,
        created_utc: data.created_utc,
        comment_karma: data.comment_karma,
        link_karma: data.link_karma,
        is_verified: data.is_verified,
        has_verified_email: data.has_verified_email,
      };
    }
Behavior2/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 but offers minimal information. It doesn't specify whether this is a read-only operation (implied but not stated), what data is returned, potential rate limits, authentication requirements, or error conditions. The description is too vague to adequately inform the agent about how the tool behaves.

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 wasted words. It's appropriately front-loaded with the core functionality, making it easy for an agent 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 presumably returns user data. It doesn't explain what information is retrieved (e.g., karma, account age, trophies) or the response format, leaving significant gaps for the agent to navigate.

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, clearly documenting the single required 'username' parameter. The description adds no additional parameter semantics beyond what's in the schema (e.g., it doesn't clarify format constraints or examples). This meets the baseline score when schema coverage is high.

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 Reddit user'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'get_user_comments' or 'get_user_posts' that also retrieve user-related information, which prevents a perfect score.

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 like 'get_user_comments' or 'get_user_posts'. There's no mention of what type of user information is retrieved (e.g., profile details vs. activity) or any prerequisites, leaving the agent to guess based on tool names 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/liuyang1520/reddit-mcp'

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