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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/sitebay_mcp/server.py:606-639 (handler)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)}"