Skip to main content
Glama
jkingsman

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

get_timeline_summary

Summarizes QAnon posts within specified date ranges for research and analysis purposes.

Instructions

Get a timeline summary of posts/drops, optionally within a date range.

Args:
    start_date: Optional start date in YYYY-MM-DD format
    end_date: Optional end date in YYYY-MM-DD format

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
start_dateNo
end_dateNo

Implementation Reference

  • The primary handler for the 'get_timeline_summary' MCP tool. This function generates a chronological timeline summary of QAnon posts, grouped by month, with optional date range filtering. It uses the global 'posts' dataset, sorts by timestamp, groups into months, and samples key posts for summary display.
    @mcp.tool()
    def get_timeline_summary(start_date: str = None, end_date: str = None) -> str:
        """
        Get a timeline summary of posts/drops, optionally within a date range.
    
        Args:
            start_date: Optional start date in YYYY-MM-DD format
            end_date: Optional end date in YYYY-MM-DD format
        """
        # Use all posts if no dates provided
        timeline_posts = posts
    
        # Filter by date range if provided
        if start_date and end_date:
            try:
                datetime.strptime(start_date, "%Y-%m-%d")
                datetime.strptime(end_date, "%Y-%m-%d")
                timeline_posts = get_posts_by_date_range(start_date, end_date)
            except ValueError:
                return "Invalid date format. Please use YYYY-MM-DD format."
    
        # Sort posts by time
        timeline_posts = sorted(
            timeline_posts, key=lambda x: x.get("post_metadata", {}).get("time", 0)
        )
    
        if not timeline_posts:
            return "No posts found for the specified date range."
    
        # Group posts by month
        months = {}
        for post in timeline_posts:
            timestamp = post.get("post_metadata", {}).get("time", 0)
            if timestamp:
                month_key = datetime.fromtimestamp(timestamp).strftime("%Y-%m")
                if month_key not in months:
                    months[month_key] = []
                months[month_key].append(post)
    
        # Build the timeline
        timeline = "QAnon Posts Timeline:\n\n"
    
        for month_key in sorted(months.keys()):
            month_name = datetime.strptime(month_key, "%Y-%m").strftime("%B %Y")
            month_posts = months[month_key]
    
            timeline += f"## {month_name} ({len(month_posts)} posts)\n\n"
    
            # Get the first and last 2 posts of the month as examples
            sample_posts = []
            if len(month_posts) <= 4:
                sample_posts = month_posts
            else:
                sample_posts = month_posts[:2] + month_posts[-2:]
    
            for post in sample_posts:
                post_id = post.get("post_metadata", {}).get("id", "Unknown")
                timestamp = post.get("post_metadata", {}).get("time", 0)
                day = datetime.fromtimestamp(timestamp).strftime("%d %b")
    
                text = post.get("text", "")
                if text:
                    text = text.replace("\\n", " ")
                    # Truncate text if too long
                    if len(text) > 100:
                        text = text[:97] + "..."
    
                timeline += f"- {day}: Post #{post_id} - {text}\n"
    
            if len(month_posts) > 4:
                timeline += f"  ... and {len(month_posts) - 4} more posts this month\n"
    
            timeline += "\n"
    
        return timeline
  • Helper function called by get_timeline_summary to filter the posts list by a given date range, converting dates to timestamps for comparison with post metadata times.
    def get_posts_by_date_range(start_date: str, end_date: str) -> List[Dict]:
        """Get posts within a date range (YYYY-MM-DD format)."""
        try:
            start_timestamp = int(datetime.strptime(start_date, "%Y-%m-%d").timestamp())
            end_timestamp = (
                int(datetime.strptime(end_date, "%Y-%m-%d").timestamp()) + 86400
            )  # Add a day in seconds
    
            results = []
            for post in posts:
                post_time = post.get("post_metadata", {}).get("time", 0)
                if start_timestamp <= post_time <= end_timestamp:
                    results.append(post)
            return results
        except ValueError:
            return []
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 tool retrieves a 'summary' but doesn't specify what that includes (e.g., aggregated data, counts, highlights), whether it's read-only (implied by 'Get'), or any limitations like pagination or rate limits. The description adds minimal context beyond the basic operation.

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 and front-loaded: the first sentence states the core purpose, followed by a brief parameter section. There's no wasted text, and the structure is clear. It could be slightly more concise by integrating parameter details into the main sentence, but it's efficient overall.

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 tool's moderate complexity (2 optional parameters, no annotations, no output schema), the description is minimally adequate. It covers the purpose and parameters but lacks details on the summary format, behavioral traits, or differentiation from siblings. Without annotations or output schema, more context on what 'summary' entails would improve completeness.

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 adds significant value beyond the input schema, which has 0% description coverage. It explains that 'start_date' and 'end_date' are optional parameters for filtering within a date range and specifies the format ('YYYY-MM-DD'), which isn't in the schema. With 2 parameters and low schema coverage, this compensation is effective, though it doesn't cover all potential semantics like default behaviors.

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 tool's purpose: 'Get a timeline summary of posts/drops, optionally within a date range.' It specifies the verb ('Get'), resource ('timeline summary of posts/drops'), and scope ('optionally within a date range'). However, it doesn't explicitly differentiate from sibling tools like 'get_posts_by_date' or 'search_posts', which might offer similar date-based filtering.

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. It mentions date range filtering but doesn't clarify if this is for summaries only, how it differs from 'get_posts_by_date' (which might return full posts), or any prerequisites. Usage is implied by the parameters but not explicitly stated.

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