Skip to main content
Glama

Affiliates

onelence_list_affiliates
Read-onlyIdempotent

Affiliate partners with referral and coupon codes, clicks, conversions and conversion rate, all time unless start or end is passed; with start, compare=previous_period adds the period before. Pass site for one site; without it, every site in the workspace. Metrics are null when attribution could not be read. For partner Decisions use onelence_list_decisions with type=affiliate.

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": "onelence_list_affiliates"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoCount up to this date (inclusive) or ISO 8601 date-time. Without end, there is no upper bound.
siteNoOnly partners on this site. Without it, the whole workspace.
limitNoItems to return (default 25).
startNoCount clicks and conversions from this date (YYYY-MM-DD) or ISO 8601 date-time. Without start, there is no lower bound; without either, all time.
cursorNonext_cursor from the previous call, for more.
statusNoFor example active or paused.
compareNoprevious_period adds each partner's clicks and conversions in the same-length window right before start, with the percent change (default none). Needs start.

Output Schema

NameRequiredDescriptionDefault
dataYes
moreNoHow to fetch the next page, when has_more.
noteYes
limitYes
activeYes
objectYes
windowYes
has_moreYes
comparisonYes
next_cursorYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / properties / compare
      Added value: +{
      +  "description": "previous_period adds each partner's clicks and conversions in the same-length window right before start, with the percent change (default none). Needs start.",
      +  "enum": [
      +    "none",
      +    "previous_period"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / end
      Added value: +{
      +  "description": "Count up to this date (inclusive) or ISO 8601 date-time. Without end, there is no upper bound.",
      +  "maxLength": 40,
      +  "type": "string"
      +}
    • changedInput schema / properties / site / description
      Previous value: -"Site domain (e.g. example.com) or site id. Defaults to the workspace's newest active site."New value: +"Only partners on this site. Without it, the whole workspace."
    • addedInput schema / properties / start
      Added value: +{
      +  "description": "Count clicks and conversions from this date (YYYY-MM-DD) or ISO 8601 date-time. Without start, there is no lower bound; without either, all time.",
      +  "maxLength": 40,
      +  "type": "string"
      +}
    • addedInput schema / properties / status / description
      Added value: +"For example active or paused."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "active": {
      +      "type": "number"
      +    },
      +    "comparison": {
      +      "anyOf": [
      +        {
      +          "properties": {
      +            "window": {
      +              "properties": {
      +                "end": {
      +                  "type": "string"
      +                },
      +                "start": {
      +                  "type": "string"
      +                }
      +              },
      +              "required": [
      +                "start",
      +                "end"
      +              ],
      +              "type": "object"
      +            }
      +          },
      +          "required": [
      +            "window"
      +          ],
      +          "type": "object"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "data": {
      +      "items": {
      +        "properties": {
      +          "clicks": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "clicks_change_pct": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "code": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "conversion_rate_pct": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "conversions": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "conversions_change_pct": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "coupon_codes": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "created_at": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "metrics_state": {
      +            "enum": [
      +              "available",
      +              "unavailable"
      +            ],
      +            "type": "string"
      +          },
      +          "name": {
      +            "type": "string"
      +          },
      +          "object": {
      +            "const": "affiliate",
      +            "type": "string"
      +          },
      +          "previous_clicks": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "previous_conversions": {
      +            "anyOf": [
      +              {
      +                "type": "number"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "site_id": {
      +            "anyOf": [
      +              {
      +                "type": "string"
      +              },
      +              {
      +                "type": "null"
      +              }
      +            ]
      +          },
      +          "status": {
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "object",
      +          "id",
      +          "name",
      +          "status",
      +          "site_id",
      +          "code",
      +          "coupon_codes",
      +          "metrics_state",
      +          "clicks",
      +          "conversions",
      +          "conversion_rate_pct",
      +          "created_at"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "has_more": {
      +      "type": "boolean"
      +    },
      +    "limit": {
      +      "anyOf": [
      +        {
      +          "type": "number"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "more": {
      +      "description": "How to fetch the next page, when has_more.",
      +      "type": "string"
      +    },
      +    "next_cursor": {
      +      "anyOf": [
      +        {
      +          "type": "string"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ]
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "object": {
      +      "const": "list",
      +      "type": "string"
      +    },
      +    "window": {
      +      "properties": {
      +        "end": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "start": {
      +          "anyOf": [
      +            {
      +              "type": "string"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        }
      +      },
      +      "required": [
      +        "start",
      +        "end"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "object",
      +    "data",
      +    "has_more",
      +    "next_cursor",
      +    "window",
      +    "comparison",
      +    "active",
      +    "limit",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already establish readOnly, idempotent, non-destructive behavior, so the description's job is to add context, and it does: default all-time window, compare adding the prior equal-length window with percent change, and the important caveat that metrics are null when attribution could not be read. That null caveat is genuine behavioral disclosure an agent cannot get from structured fields. Pagination behavior is left to the schema rather than elaborated.

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

Conciseness4/5

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

The scoping rule and the default window are front-loaded, and the sibling redirect sits at the end where it is useful as a fallback. The semicolon-chained clauses make it denser than necessary, but no sentence is filler.

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

Completeness4/5

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

For a read-only list tool with a full output schema, the description covers scope defaults, period comparison, filtering, null-metric edge cases and one alternative route. Remaining gaps — pagination flow and the set of valid status values — are minor given the schema already documents cursor and status.

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%, so the baseline is 3. The description mostly restates schema text — the all-time default, the site scoping, 'Needs start' for compare — rather than adding new meaning such as accepted status values or date format edge cases. The one mild addition is the combined statement of how start and end jointly define the window, which is only marginally beyond the per-parameter schema descriptions.

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 names a concrete resource and its payload: affiliate partners with referral and coupon codes, clicks, conversions and conversion rate. It also pins the default temporal scope (all time unless start or end is passed), so an agent knows exactly what is returned. It stops short of distinguishing itself from the closely named siblings onelence_find_affiliate_partners and onelence_get_affiliate, so it is clear but not fully sibling-differentiated.

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?

It gives explicit routing for one case: 'For partner Decisions use onelence_list_decisions with type=affiliate,' and explains the site versus whole-workspace choice and that compare=previous_period requires start. What is missing is guidance against the other lookalike siblings (find_affiliate_partners, get_affiliate, set_partner_status), which an agent choosing an affiliate tool would also weigh.

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.