Skip to main content
Glama
jaipandya

product-hunt-mcp

by jaipandya

get_comment

Retrieve detailed information about a specific Product Hunt comment using its unique ID. Access comment content, user details, timestamps, and related post data.

Instructions

    Retrieve detailed information about a specific comment by ID.

    Parameters:
    - id (str, required): The comment's unique ID.

    Returns:
    - success (bool)
    - data (dict): If successful, contains comment details:
        - id, content, created_at, user, post, etc.
    - error (dict, optional)
    - rate_limits (dict)

    Notes:
    - Returns an error if the comment is not found.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNo

Implementation Reference

  • The get_comment tool handler: retrieves a specific comment by ID via GraphQL query, validates input, handles errors, logs the call, and formats the response with rate limits.
    def get_comment(id: str = None) -> Dict[str, Any]:
        """
        Retrieve detailed information about a specific comment by ID.
    
        Parameters:
        - id (str, required): The comment's unique ID.
    
        Returns:
        - success (bool)
        - data (dict): If successful, contains comment details:
            - id, content, created_at, user, post, etc.
        - error (dict, optional)
        - rate_limits (dict)
    
        Notes:
        - Returns an error if the comment is not found.
        """
        params = {k: v for k, v in {"id": id}.items() if v is not None}
        logger.info("comments.get_comment called", extra=params)
    
        comment_data, rate_limits, error = execute_and_check_query(
            COMMENT_QUERY, {"id": id}, "comment", id
        )
    
        if error:
            return format_response(False, error=error, rate_limits=rate_limits)
    
        return format_response(True, data=comment_data, rate_limits=rate_limits)
  • Schema for validating the input parameter 'id' (required string) for the get_comment tool.
    COMMENT_SCHEMA = {"id": {"required": True, "type": str}}
  • Registration of comment tools (including get_comment) by calling register_comment_tools on the MCP server instance in the main CLI entry point.
    register_comment_tools(mcp)
  • Direct registration of the get_comment tool using @mcp.tool() decorator inside the register_comment_tools function.
    @mcp.tool()
    @require_token
    @handle_errors
    @validate_with_schema(COMMENT_SCHEMA)
    def get_comment(id: str = None) -> Dict[str, Any]:
        """
        Retrieve detailed information about a specific comment by ID.
    
        Parameters:
        - id (str, required): The comment's unique ID.
    
        Returns:
        - success (bool)
        - data (dict): If successful, contains comment details:
            - id, content, created_at, user, post, etc.
        - error (dict, optional)
        - rate_limits (dict)
    
        Notes:
        - Returns an error if the comment is not found.
        """
        params = {k: v for k, v in {"id": id}.items() if v is not None}
        logger.info("comments.get_comment called", extra=params)
    
        comment_data, rate_limits, error = execute_and_check_query(
            COMMENT_QUERY, {"id": id}, "comment", id
        )
    
        if error:
            return format_response(False, error=error, rate_limits=rate_limits)
    
        return format_response(True, data=comment_data, rate_limits=rate_limits)
Behavior4/5

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

With no annotations provided, the description carries the full burden and adds valuable behavioral context: it discloses that it returns an error if the comment is not found, describes the return structure (success, data, error, rate_limits), and hints at rate limits. It does not cover permissions, side effects, or pagination, but for a read operation, this is reasonably comprehensive.

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 well-structured with clear sections (purpose, parameters, returns, notes), front-loaded with the core purpose, and every sentence adds value without redundancy. It efficiently communicates necessary information in a compact format.

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 no annotations, no output schema, and low schema coverage, the description does a good job covering purpose, parameters, returns, and error behavior. It lacks details on authentication, rate limit specifics, or data field examples, but for a simple read tool, it provides sufficient context for basic use.

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

Parameters4/5

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

The schema has 0% description coverage, so the description must compensate. It explicitly documents the single parameter 'id' as 'The comment's unique ID,' which adds essential meaning beyond the schema's bare type. However, it does not specify format constraints (e.g., length, pattern) or examples, leaving some gaps.

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?

The description clearly states the specific action ('Retrieve detailed information') and resource ('about a specific comment by ID'), distinguishing it from siblings like get_post_comments (which retrieves multiple comments) or get_post_details (which focuses on posts). The verb+resource combination is precise and unambiguous.

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

Usage Guidelines4/5

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

The description implies usage context by specifying it retrieves 'a specific comment by ID,' suggesting it should be used when you have a comment ID rather than for listing comments. However, it does not explicitly name alternatives (e.g., get_post_comments for multiple comments) or state when not to use it, leaving some guidance implicit rather than explicit.

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/jaipandya/producthunt-mcp-server'

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