Skip to main content
Glama

Affiliate

onelence_get_affiliate
Read-onlyIdempotent

One affiliate partner by id or referral code: status, codes, clicks, conversions and conversion rate, all time unless start or end is passed; with start, compare=previous_period adds the period before. Metrics are null when attribution could not be read. For the partner's Decision use onelence_list_decisions with type=affiliate.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "affiliate_id": "<affiliate_id>"
    },
    "name": "onelence_get_affiliate"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoCount up to this date (inclusive) or ISO 8601 date-time. Without end, there is no upper bound.
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.
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.
affiliate_idYesThe partner id from the affiliates list, or its referral code.

Output Schema

NameRequiredDescriptionDefault
idYes
codeYes
nameYes
clicksYes
objectYes
statusYes
windowYes
site_idYes
comparisonYes
created_atYes
conversionsYes
coupon_codesYes
metrics_stateYes
previous_clicksNo
clicks_change_pctNo
conversion_rate_pctYes
previous_conversionsNo
conversions_change_pctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and closed-world, so the safety profile is covered. The description adds meaningful behavior beyond that: metrics are null when attribution could not be read (a real data-quality caveat an agent must handle), the all-time default window, and the fact that comparison adds a prior equal-length window with percent change. No mention of error behavior when the id/code is unknown, which is the main remaining gap.

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?

Two sentences, front-loaded with the resource and its returned fields, then the date/compare default, then a routing pointer. Slightly run-on but every clause carries information; no 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?

With an output schema present, return values need not be explained, and annotations cover the safety profile. The description supplies the non-obvious pieces — null metrics on unreadable attribution, default all-time range, comparison requirement for start — leaving only error/not-found handling unstated.

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 every parameter including the compare enum and the start/end formats is already documented. The description restates the date-window and comparison semantics and the accept-a-referral-code behavior rather than adding syntax or constraints beyond the schema. Baseline 3 is appropriate since the schema carries the parameter load.

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?

States a specific verb and resource ('One affiliate partner by id or referral code') and enumerates the returned fields (status, codes, clicks, conversions, conversion rate), which distinguishes it from the list-style siblings onelence_list_affiliates and onelence_find_affiliate_partners. An agent can identify it as a single-record fetch without opening the schema.

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?

Gives clear usage context: default is all time, passing start/end narrows the window, and compare=previous_period applies only with start. It also routes the agent elsewhere for a related need ('For the partner's Decision use onelence_list_decisions with type=affiliate'). It stops short of explicitly contrasting itself with list_affiliates/find_affiliate_partners, so the get-vs-list choice is inferred rather than stated.

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.