get_post_thread
Retrieve complete conversation threads from Bluesky Social by fetching posts, replies, and parent content for comprehensive context.
Instructions
Get a full conversation thread.
Args:
ctx: MCP context
uri: URI of the post to get thread for
depth: How many levels of replies to include
parent_height: How many parent posts to include
Returns:
Thread with the post and its replies/parents
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uri | Yes | ||
| depth | No | ||
| parent_height | No |
Implementation Reference
- server.py:631-664 (handler)The main handler function for the 'get_post_thread' tool. It authenticates the Bluesky client, calls the underlying atproto client's get_post_thread method, converts the response to a dict, and returns it wrapped in a success/error structure.@mcp.tool() def get_post_thread( ctx: Context, uri: str, depth: Optional[int] = None, parent_height: Optional[int] = None, ) -> Dict: """Get a full conversation thread. Args: ctx: MCP context uri: URI of the post to get thread for depth: How many levels of replies to include parent_height: How many parent posts to include Returns: Thread with the post and its replies/parents """ try: bluesky_client = get_authenticated_client(ctx) thread_response = bluesky_client.get_post_thread(uri, depth, parent_height) # Convert the response to a dictionary if hasattr(thread_response, "model_dump"): thread_data = thread_response.model_dump() else: thread_data = thread_response return {"status": "success", "thread": thread_data} except Exception as e: error_msg = f"Failed to get post thread: {str(e)}" return {"status": "error", "message": error_msg}