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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)}"
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the return type ('List of users'), but lacks details on behavioral traits such as authentication requirements, rate limits, pagination, error handling, or whether it's read-only (implied by 'Get' but not confirmed). This is a significant gap for a tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is highly concise and well-structured: two sentences that front-load the purpose ('Get affiliate referral information') and follow with return details. Every sentence adds value without waste, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, output schema exists), the description is adequate but incomplete. It covers the purpose and return type, but lacks behavioral context (e.g., auth needs) that isn't provided by annotations or schema. With an output schema, return values are documented elsewhere, so the description doesn't need to explain them, but overall completeness is moderate due to missing operational details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately adds no parameter details, focusing on the tool's purpose and output. Baseline is 4 for zero parameters, as it avoids unnecessary repetition.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with 'Get affiliate referral information' (verb+resource) and elaborates with 'Returns: List of users who signed up using your affiliate links'. It distinguishes from siblings like sitebay_list_sites or sitebay_list_teams by focusing on affiliate data, but doesn't explicitly differentiate from all siblings (e.g., sitebay_account_create_checkout).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an affiliate account), exclusions, or comparisons to other tools like sitebay_list_sites for general user data. Usage is implied by the purpose but not explicitly stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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