Skip to main content
Glama

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
NameRequiredDescriptionDefault
handleNo

Implementation Reference

  • 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}

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/gwbischof/bluesky-social-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server