Skip to main content
Glama

get_customers_per_affiliate

Read-onlyIdempotent

Get all customers connected to a specific affiliate using the affiliate ID. This read-only, paginated lookup simplifies affiliate customer reporting without modifying any school data.

Instructions

๐ŸŸข READ-ONLY ยท GET /v2/affiliates/{id}/customers

Get all customers per affiliate. Retrieves all the customers connected with the affiliate specified by the provided affiliate id. The customers are in sorted order, with the most recently created customer appearing first, and the list is paginated, with a limit of 20 customers per page.

Behavior: read-only lookup against the live school; creates, changes and deletes nothing. Auth (admin API token + Lw-Client id) is injected server-side, never by the model; calls are throttled to stay under LearnWorlds' 30-per-10s cap and retried on 429/5xx. Parameters: results are paged โ€” walk them with page. Returns: HTTP <status> followed by the LearnWorlds JSON response body. A non-2xx reply surfaces as a tool error with that status and the API error payload โ€” 401 bad/expired token, 403 not permitted, 404 no such record, 422 rejected input. Use when: safe to call speculatively for lookups and reporting. Not for changing anything โ€” use the matching ๐ŸŸก write tool. Related Affiliates tools: get_affiliate_payments, get_completed_affiliate_payouts, get_due_affiliate_payouts, get_leads_per_affiliate, get_upcoming_affiliate_payouts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesAffiliate Id or email (encoded string)
pageNoFilter by the page number. In case page number is higher than the maximum one, the results of last page will be returned

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing server-side auth injection, throttling under LearnWorlds' rate cap, retry behavior on 429/5xx, the HTTP status + JSON body return format, and specific error status meanings. No contradiction with readOnlyHint or destructiveHint.

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 description is well-organized into endpoint, behavior, parameters, returns, and use-when sections, with the read-only status front-loaded. It is detailed but not bloated, though it does repeat information already conveyed by annotations such as read-only behavior.

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?

For a two-parameter read-only tool with no output schema, the description covers everything needed to call it correctly: endpoint, auth, rate limiting, retries, pagination, and error handling. The agent knows what to expect and how to interpret non-2xx responses.

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 schema already documents both id and page with 100% coverage. The description adds useful pagination context: results are paged, use the page parameter to walk pages, and each page has a limit of 20 customers. This is extra value beyond the schema descriptions.

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: it retrieves all customers connected to an affiliate id, with sorting and pagination details. This clearly distinguishes it from siblings such as get_leads_per_affiliate by focusing on customers rather than leads or payments.

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?

Provides explicit 'Use when' guidance, saying it is safe for speculative lookups and reporting, and warns not to use it for changes, directing the agent to the matching write tool. It also lists related affiliate tools, though it does not explicitly spell out the exact conditions for choosing between this and each listed sibling.

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/ohneben/Learnworlds-MCP'

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