Skip to main content
Glama
sitebay
by sitebay

sitebay_account_affiliates

Retrieve referral data for affiliate links to track users who signed up through your promotions.

Instructions

Get affiliate referral information.

Returns: List of users who signed up using your affiliate links

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'sitebay_account_affiliates' tool. Decorated with @mcp.tool for automatic registration and schema inference. Fetches affiliate referrals using the SiteBay client and returns a formatted string list.
    @mcp.tool
    async def sitebay_account_affiliates(ctx: Context) -> str:
        """
        Get affiliate referral information.
        
        Returns:
            List of users who signed up using your affiliate links
        """
        try:
            await ctx.info("Fetching affiliate referrals")
            
            client = await initialize_client()
            affiliates = await client.get_affiliate_referrals()
            
            if not affiliates:
                return "No affiliate referrals found."
            
            result = f"**Your Affiliate Referrals** ({len(affiliates)} referrals):\n\n"
            
            for affiliate in affiliates:
                result += f"• **Email**: {affiliate.get('email', 'Unknown')}\n"
                result += f"  - Name: {affiliate.get('full_name', 'Unknown')}\n"
                result += f"  - Signed up: {affiliate.get('created_at', 'Unknown')}\n"
                result += f"  - Active: {affiliate.get('is_active', 'Unknown')}\n\n"
            
            await ctx.info("Successfully retrieved affiliate referrals")
            return result
            
        except SiteBayError as e:
            await ctx.error(f"Error fetching affiliates: {str(e)}")
            return f"❌ Affiliate Error: {str(e)}"
        except Exception as e:
            await ctx.error(f"Unexpected affiliate error: {str(e)}")
            return f"❌ Unexpected error: {str(e)}"

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/sitebay/sitebay-mcp'

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