Skip to main content
Glama
cmcgrabby-hue

syndicate-links-mcp

get_commission_status

Check your affiliate commission balance to view available payouts, pending approvals, and lifetime earnings totals in USD.

Instructions

Return the commission balance for the authenticated affiliate (identified by SYNDICATE_AGENT_KEY). Returns available (approved and ready to pay out), pending (not yet approved), and lifetime totals in USD.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes get_commission_status tool logic - makes API call to /affiliate/me/balance with agent auth
    export async function runGetCommissionStatus(config: ApiConfig): Promise<unknown> {
      return apiFetch(config, '/affiliate/me/balance', { authType: 'agent' });
    }
  • Tool definition including name, description and input schema for get_commission_status (empty properties object since no inputs required)
    export const getCommissionStatusTool: Tool = {
      name: 'get_commission_status',
      description:
        'Return the commission balance for the authenticated affiliate (identified by ' +
        'SYNDICATE_AGENT_KEY). Returns available (approved and ready to pay out), ' +
        'pending (not yet approved), and lifetime totals in USD.',
      inputSchema: {
        type: 'object' as const,
        properties: {},
        required: [],
      },
    };
  • Import of getCommissionStatusTool and runGetCommissionStatus from commission module
    import {
      getCommissionStatusTool,
      runGetCommissionStatus,
      runPayoutCycleTool,
      runPayoutCycle,
    } from './tools/commission.js';
    import { listMerchantProgramsTool, runListMerchantPrograms } from './tools/programs.js';
  • Tool dispatch case in the switch statement that routes get_commission_status calls to runGetCommissionStatus handler
    case 'get_commission_status':
      result = await runGetCommissionStatus(cfg);
      break;
  • Helper function apiFetch used by the handler to make authenticated HTTP requests to the API
    export async function apiFetch(
      config: ApiConfig,
      path: string,
      opts: RequestOptions,
    ): Promise<unknown> {
      const headers: Record<string, string> = {
        'Content-Type': 'application/json',
        Accept: 'application/json',
      };
    
      switch (opts.authType) {
        case 'agent':
          if (!config.agentKey) throw new ApiError(401, 'SYNDICATE_AGENT_KEY not configured');
          headers['Authorization'] = `Bearer ${config.agentKey}`;
          break;
        case 'merchant':
          if (!config.merchantKey) throw new ApiError(401, 'SYNDICATE_MERCHANT_KEY not configured');
          headers['Authorization'] = `Bearer ${config.merchantKey}`;
          break;
        case 'admin':
          if (!config.adminSecret) throw new ApiError(401, 'SYNDICATE_ADMIN_SECRET not configured');
          headers['x-admin-secret'] = config.adminSecret;
          break;
        case 'none':
          break;
      }
    
      const res = await fetch(`${config.baseUrl}${path}`, {
        method: opts.method ?? 'GET',
        headers,
        body: opts.body !== undefined ? JSON.stringify(opts.body) : undefined,
        signal: AbortSignal.timeout(30_000),
      });
    
      let data: unknown;
      try {
        data = await res.json();
      } catch {
        data = { message: res.statusText };
      }
    
      if (!res.ok) {
        const d = data as Record<string, unknown> | null;
        const msg =
          d != null && typeof d === 'object'
            ? typeof d['error'] === 'string'
              ? d['error']
              : typeof d['message'] === 'string'
                ? d['message']
                : `HTTP ${res.status}`
            : `HTTP ${res.status}`;
        throw new ApiError(res.status, msg);
      }
    
      return data;
    }
Behavior4/5

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

No annotations provided, so description carries full burden. It successfully discloses the authentication mechanism (SYNDICATE_AGENT_KEY) and return value structure (available, pending, lifetime totals in USD). Missing rate limits or error behaviors, but adequate for a simple read operation.

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?

Two sentences with zero waste. Front-loaded with core purpose ('Return the commission balance'), followed by auth context and return value details. Every word earns its place.

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

Completeness5/5

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

No output schema exists, and the description compensates by explicitly detailing the three return categories (available, pending, lifetime) and currency (USD). For a zero-parameter read tool, this is complete.

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?

Zero parameters in schema (baseline 4). Description adds value by explaining how the affiliate is identified (via SYNDICATE_AGENT_KEY), providing semantic context for the implicit authentication context despite empty input schema.

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

Purpose5/5

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

Specific verb 'Return' + resource 'commission balance' + scope 'for the authenticated affiliate'. Clearly distinguishes from siblings which focus on programs (get_program_details, list_merchant_programs), payouts (run_payout_cycle), or tracking (track_agent_conversion) rather than balance inquiry.

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

Usage Guidelines3/5

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

Implies authentication requirement by mentioning 'authenticated affiliate' and SYNDICATE_AGENT_KEY, but lacks explicit when-to-use guidance or contrast with run_payout_cycle (which executes payouts vs. this tool which only checks status). No explicit prerequisites 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/cmcgrabby-hue/syndicate-links'

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