get_post
Retrieve a specific post from Bluesky Social MCP by providing the post's record key, author handle or DID, and optional CID. Easily access detailed post data.
Instructions
Get a specific post.
Args:
ctx: MCP context
post_rkey: The record key of the post
profile_identify: Handle or DID of the post author
cid: Optional CID of the post
Returns:
The requested post
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cid | No | ||
| post_rkey | Yes | ||
| profile_identify | No |
Implementation Reference
- server.py:489-522 (handler)The main handler function for the 'get_post' tool. It is registered via the @mcp.tool() decorator and implements the logic to fetch a specific Bluesky post using the atproto Client.@mcp.tool() def get_post( ctx: Context, post_rkey: str, profile_identify: Optional[str] = None, cid: Optional[str] = None, ) -> Dict: """Get a specific post. Args: ctx: MCP context post_rkey: The record key of the post profile_identify: Handle or DID of the post author cid: Optional CID of the post Returns: The requested post """ try: bluesky_client = get_authenticated_client(ctx) post_response = bluesky_client.get_post(post_rkey, profile_identify, cid) # Convert the response to a dictionary if hasattr(post_response, "model_dump"): post_data = post_response.model_dump() else: post_data = post_response return {"status": "success", "post": post_data} except Exception as e: error_msg = f"Failed to get post: {str(e)}" return {"status": "error", "message": error_msg}
- server.py:489-489 (registration)The @mcp.tool() decorator registers the get_post function as an MCP tool.@mcp.tool()