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
| Name | Required | Description | Default |
|---|---|---|---|
| uris | Yes |
Implementation Reference
- server.py:524-552 (handler)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}