Skip to main content
Glama

Get Affiliate Statistics

get_affiliate_stats
Read-onlyIdempotent

Get click and conversion statistics for an affiliate program you own (merchant view) or for a specific partnership you belong to (partner view). Supply program_id for merchant stats, or partnership_id for your own partner earnings.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_affiliate_stats"
  }
}

Input Schema

NameRequiredDescriptionDefault
program_idNoProgram ID for merchant-side stats (clicks, conversions, total earnings across all partners)
period_daysNoLook-back window in days (default 30)
partnership_idNoPartnership ID for partner-side stats (your own clicks, conversions, earnings)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and non-open-world, so the safety profile is fully covered without help from the description. The description does add useful scope context by tying each parameter to an ownership/authorization model ("a program you own" vs "a partnership you belong to"). It does not explain the default-no-parameter behavior or what the stats cover over the period, which is the remaining behavioral gap.

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, zero filler, with the primary purpose stated first and the parameter-selection rule second. Every clause carries information an agent needs.

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?

For a read-only stats tool with no output schema and full schema coverage, the definition is broadly sufficient, but it leaves two things unresolved: whether the two IDs are mutually exclusive or one is required, and what the response actually contains. Mentioning that period_days scopes all returned metrics would close the loop.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already spells out program_id vs partnership_id and the period_days window with bounds and a default. The description restates the same merchant/partner split rather than adding syntax, format, or interaction rules (e.g. mutual exclusivity of the two IDs). With the schema doing the heavy lifting, the baseline 3 applies.

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 gives a specific verb and resource ("Get click and conversion statistics") and splits the tool into two clearly named modes, merchant view and partner view, which an agent can act on directly. It does not mention the sibling get_affiliate_partnership_stats, so the agent gets no help distinguishing this tool from that near-duplicate.

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

Usage Guidelines4/5

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

The description supplies a clear selection rule: pass program_id for merchant stats, partnership_id for your own partner earnings. That is real when-to-use guidance rather than implied usage. It stops short of naming alternatives or stating exclusions, such as what happens when neither ID is supplied or when both are.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources