Skip to main content
Glama

make_affiliate

Turn any LearnWorlds user into an affiliate using their user ID or email, and set optional commission, payment method, and notes.

Instructions

๐ŸŸก WRITE ยท creates data ยท POST /v2/affiliates/{id}

Makes a user specified by the provided user id an affiliate. The endpoint response is the affiliate resource.

Behavior: creates a record or triggers an action in the live school. Not idempotent: a repeated call can duplicate the effect. 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: the whole JSON payload goes in the single body argument, forwarded verbatim (the spec leaves body optional, but this endpoint expects one). 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: only when the user asked to create this. Check with a ๐ŸŸข read tool that the target exists and the record is not already there. Related Affiliates tools: get_affiliate_payments, get_completed_affiliate_payouts, get_customers_per_affiliate, get_due_affiliate_payouts, get_leads_per_affiliate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesUser Id or email (encoded string)
bodyNo

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?

Annotations already flag non-readonly and non-idempotent; the description reinforces and expands with concrete context: repeated calls can duplicate the effect, auth is injected server-side so the model never supplies tokens, calls are throttled under LearnWorlds' 30-per-10s cap and retried on 429/5xx, and non-2xx statuses surface as tool errors with 401/403/404/422 mappings. No contradiction with annotations โ€” the write claim aligns with readOnlyHint=false and the non-idempotency claim aligns with idempotentHint=false.

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?

Labeled sections (Behavior, Parameters, Returns, Use when) with the verb and endpoint front-loaded make this highly scannable. It runs longer than average, but every section carries actionable information โ€” idempotency, auth, throttling, error mapping โ€” so the length is justified rather than padded.

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 mutating tool with no output schema and a nested body, the description closes nearly every gap: side effects in the live school, non-idempotency, auth handling, rate limits, exact return shape (HTTP status + JSON body), and error semantics. The only minor omission is that the pre-check read tool is left generic ('a ๐ŸŸข read tool') rather than naming get_affiliates, but this does not meaningfully impair an agent's ability to call the tool correctly.

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 documents id and the nested body fields well, but the body object itself has an empty description (50% top-level coverage). The description compensates for exactly that gap by disclosing that the whole payload goes in the single body argument, is forwarded verbatim, and is in practice required even though the spec marks it optional โ€” genuinely useful nuance the schema does not convey.

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+resource: making a user an affiliate, backed by the explicit endpoint POST /v2/affiliates/{id}. It is unmistakably distinct from the many get_* affiliate siblings because it is the only write operation among them, and it visibly differentiates itself from the related read tools.

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 an explicit activation condition ('Use when: only when the user asked to create this') and a required precondition (verify the target exists and is not already an affiliate with a ๐ŸŸข read tool). It names related affiliate tools but stops short of mapping each alternative to a specific condition, so the when-not logic is largely implied rather than spelled out.

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