get_post_thread
Retrieve a complete conversation thread for a post, including replies and parent posts, by specifying the URI and desired depth levels for analysis or 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 |
|---|---|---|---|
| depth | No | ||
| parent_height | No | ||
| uri | Yes |
Implementation Reference
- server.py:631-664 (handler)The primary handler function for the 'get_post_thread' MCP tool. It is decorated with @mcp.tool(), takes parameters for the post URI and optional depth/parent_height, authenticates a Bluesky client, fetches the thread, converts it to a dictionary if necessary, and returns a success/error response.@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}
- server.py:1084-1085 (registration)The tool 'get_post_thread' is listed in the categories of available tools within the info resource provided by the MCP server."get_post_thread", ],