Skip to main content
Glama
ferdousbhai

WSB Analyst MCP Server

fetch_batch_post_details

Retrieve details for multiple Reddit posts simultaneously to analyze WallStreetBets content for market insights.

Instructions

Fetch details for multiple posts efficiently.

Args:
    post_ids: List of Reddit post IDs

Returns:
    Dictionary with details for all requested posts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
post_idsYes

Implementation Reference

  • The core handler function for the 'fetch_batch_post_details' tool, registered via @mcp.tool() decorator. It processes a batch of post IDs by sequentially fetching details for each using 'fetch_post_details', aggregates the results, and provides progress updates via the Context if available.
    async def fetch_batch_post_details(post_ids: list[str], ctx: Context = None) -> dict:
        """
        Fetch details for multiple posts efficiently.
    
        Args:
            post_ids: List of Reddit post IDs
    
        Returns:
            Dictionary with details for all requested posts
        """
        if not post_ids:
            return {"error": "No post IDs provided"}
    
        results = {}
        total = len(post_ids)
    
        for i, post_id in enumerate(post_ids):
            if ctx:
                await ctx.report_progress(i, total)
    
            detail = await fetch_post_details(post_id)
            results[post_id] = detail
    
        if ctx:
            await ctx.report_progress(total, total)
    
        return {
            "count": len(results),
            "posts": results
        }

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/ferdousbhai/wsb-analyst-mcp'

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