Skip to main content
Glama
jkingsman

https://github.com/jkingsman/qanon-mcp-server

analyze_post

Analyze QAnon posts to extract detailed information, references, and contextual insights for research purposes.

Instructions

Get detailed analysis of a specific post/drop including references and context.

Args:
    post_id: The ID of the post to analyze

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idYes

Implementation Reference

  • The handler function for the "analyze_post" tool. It provides a detailed analysis of a specific QAnon post including metadata, content, images, referenced posts, author context, and position in the timeline with adjacent posts.
    @mcp.tool()
    def analyze_post(post_id: int) -> str:
        """
        Get detailed analysis of a specific post/drop including references and context.
    
        Args:
            post_id: The ID of the post to analyze
        """
        post = get_post_by_id(post_id)
        if not post:
            return f"Post with ID {post_id} not found."
    
        metadata = post.get("post_metadata", {})
        author = metadata.get("author", "Unknown")
        author_id = metadata.get("author_id", "Unknown")
        timestamp = metadata.get("time", 0)
        date_str = (
            datetime.fromtimestamp(timestamp).strftime("%Y-%m-%d %H:%M:%S")
            if timestamp
            else "Unknown"
        )
    
        source = metadata.get("source", {})
        board = source.get("board", "Unknown")
        site = source.get("site", "Unknown")
        link = source.get("link", "Unknown")
    
        text = post.get("text", "")
        if text:
            text = text.replace("\\n", "\n")
    
        # Images analysis
        images = post.get("images", [])
        images_analysis = ""
        if images:
            images_analysis = f"\n\nImages ({len(images)}):\n"
            for i, img in enumerate(images, 1):
                images_analysis += f"{i}. File: {img.get('file', 'Unknown')}, Name: {img.get('name', 'Unknown')}\n"
    
        # Referenced posts analysis
        refs = post.get("referenced_posts", [])
        refs_analysis = ""
        if refs:
            refs_analysis = f"\n\nReferenced Posts ({len(refs)}):\n"
            for i, ref in enumerate(refs, 1):
                ref_text = ref.get("text", "No text")
                if ref_text:
                    ref_text = ref_text.replace("\\n", "\n")
                ref_author_id = ref.get("author_id", "Unknown")
                refs_analysis += f"{i}. Reference: {ref.get('reference', 'Unknown')}\n"
                refs_analysis += f"   Author ID: {ref_author_id}\n"
                refs_analysis += f"   Text: {ref_text}\n\n"
    
        # Find other posts by the same author
        same_author_posts = get_posts_by_author_id(author_id, limit=5)
    
        # Build the analysis
        analysis = f"""
    Detailed Analysis of Post/Drop {post_id}:
    
    Basic Information:
    -----------------
    Author: {author} (ID: {author_id})
    Date: {date_str}
    Source: {board} on {site}
    Original Link: {link}
    
    Post Content:
    ------------
    {text}
    {images_analysis}
    {refs_analysis}
    
    Context:
    -------
    This post is part of {len(posts)} total posts in the dataset.
    """
    
        # Add information about posts around this one
        post_position = None
        for i, p in enumerate(
            sorted(posts, key=lambda x: x.get("post_metadata", {}).get("id", 0))
        ):
            if p.get("post_metadata", {}).get("id") == post_id:
                post_position = i
                break
    
        if post_position is not None:
            analysis += f"\nThis is post #{post_position + 1} in chronological order.\n"
    
            # Previous post
            if post_position > 0:
                prev_post = posts[post_position - 1]
                prev_id = prev_post.get("post_metadata", {}).get("id", "Unknown")
                prev_date = datetime.fromtimestamp(
                    prev_post.get("post_metadata", {}).get("time", 0)
                ).strftime("%Y-%m-%d")
                analysis += f"\nPrevious post: #{prev_id} from {prev_date}\n"
    
            # Next post
            if post_position < len(posts) - 1:
                next_post = posts[post_position + 1]
                next_id = next_post.get("post_metadata", {}).get("id", "Unknown")
                next_date = datetime.fromtimestamp(
                    next_post.get("post_metadata", {}).get("time", 0)
                ).strftime("%Y-%m-%d")
                analysis += f"Next post: #{next_id} from {next_date}\n"
    
        return analysis
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions 'detailed analysis' but doesn't disclose behavioral traits like what the analysis includes (e.g., sentiment, topics), whether it's read-only or has side effects, rate limits, or authentication needs. This leaves significant gaps for an agent to understand how it behaves.

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?

The description is appropriately sized with two sentences: a purpose statement and parameter explanation. It's front-loaded with the main action, and the 'Args' section is structured clearly. No wasted words, though it could be slightly more detailed without losing conciseness.

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?

Given the complexity (analysis tool with no annotations and no output schema), the description is minimally complete. It states the purpose and parameter, but lacks details on what 'analysis' entails, return values, or behavioral context. This is adequate for basic use but leaves gaps for effective tool selection.

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 description includes an 'Args' section that explains 'post_id: The ID of the post to analyze', adding meaning beyond the input schema, which has 0% description coverage. Since there's only one parameter, this adequately compensates, though it could provide more context on ID format or sourcing.

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 'detailed analysis of a specific post/drop including references and context', which is specific and actionable. However, it doesn't explicitly differentiate from sibling tools like 'get_post_by_id_tool' or 'search_posts', which likely retrieve posts without analysis.

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_post_by_id_tool' and 'search_posts', it's unclear if this tool should be preferred for analysis over retrieval or if it serves a distinct purpose. No exclusions or prerequisites are mentioned.

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/jkingsman/qanon-mcp-server'

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