get_profile
Retrieve user profile information from Bluesky Social, including authenticated user or specified handle data.
Instructions
Get a user profile.
Args:
ctx: MCP context
handle: Optional handle to get profile for. If None, gets the authenticated user
Returns:
Profile data
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| handle | No |
Implementation Reference
- server.py:131-155 (handler)The @mcp.tool()-decorated function that implements the core logic for retrieving a Bluesky user profile, handling optional handle parameter and authentication.@mcp.tool() def get_profile(ctx: Context, handle: Optional[str] = None) -> Dict: """Get a user profile. Args: ctx: MCP context handle: Optional handle to get profile for. If None, gets the authenticated user Returns: Profile data """ try: bluesky_client = get_authenticated_client(ctx) # If no handle provided, get authenticated user's profile if not handle: handle = bluesky_client.me.handle profile_response = bluesky_client.get_profile(handle) profile = profile_response.dict() return {"status": "success", "profile": profile} except Exception as e: error_msg = f"Failed to get profile: {str(e)}" return {"status": "error", "message": error_msg}