get_posts
Retrieve multiple posts by their URIs on Bluesky Social MCP. Input a list of URIs to receive the corresponding posts as output.
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 main handler function for the 'get_posts' MCP tool. It is decorated with @mcp.tool(), retrieves an authenticated Bluesky client, fetches multiple posts by their URIs, and returns the posts data or an error.@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}