Skip to main content
Glama

get_posts

Retrieve multiple Bluesky posts by specifying their URIs to access content directly from the Bluesky Social MCP server.

Instructions

Get multiple posts by their URIs.

Args:
    ctx: MCP context
    uris: List of post URIs to retrieve

Returns:
    List of requested posts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urisYes

Implementation Reference

  • The handler function decorated with @mcp.tool() that implements the get_posts tool logic. It fetches multiple posts using the Bluesky client given a list of URIs.
    @mcp.tool()
    def get_posts(
        ctx: Context,
        uris: List[str],
    ) -> Dict:
        """Get multiple posts by their URIs.
    
        Args:
            ctx: MCP context
            uris: List of post URIs to retrieve
    
        Returns:
            List of requested posts
        """
        try:
            bluesky_client = get_authenticated_client(ctx)
    
            posts_response = bluesky_client.get_posts(uris)
    
            # Convert the response to a dictionary
            if hasattr(posts_response, "model_dump"):
                posts_data = posts_response.model_dump()
            else:
                posts_data = posts_response
    
            return {"status": "success", "posts": posts_data}
        except Exception as e:
            error_msg = f"Failed to get posts: {str(e)}"
            return {"status": "error", "message": error_msg}

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/gwbischof/bluesky-social-mcp'

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