Skip to main content
Glama

complete_referral

Pay the referrer of a referral applied with defer_referrer_credits. user_id is the REFERRED user. Safe to repeat: the payout is keyed per referral; an already completed referral answers already_completed true. 404 NO_REFERRAL. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.

Input Schema

NameRequiredDescriptionDefault
api_keyNoCred API key (optional if set via the x-api-key header)
user_idYesExternal user ID of the referred user
project_idNoCred project ID (optional; the API key already identifies the project)
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
credit_type_idNoCredit type whose program the referral belongs to

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: idempotency keyed per referral, already_completed true on repeat, 404 NO_REFERRAL, 1 CRD charge incurred even on rejected calls with a 429 exemption, and request_id in errors for support escalation. Cost and failure-charging semantics are exactly the kind of detail an agent cannot infer elsewhere.

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?

Front-loaded with purpose, then identity semantics, then safety, then error/cost behavior in a tight telegraphic register. Every clause carries operational information; nothing is padding despite the density.

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, credit-charging tool with no annotations and no output schema, the description supplies cost model, idempotency, failure modes, and error-correlation guidance. An agent has everything needed to call it correctly and to handle rejections.

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 coverage is 100%, so the schema already documents all five parameters, including api_key, project_id, and x402_payment. The description reinforces the important user_id semantics (referred user, not referrer) but adds nothing about credit_type_id or the x402 fallback flow beyond what the schema states, so baseline 3 applies.

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?

Opens with a specific verb and resource ('Pay the referrer of a referral') and scopes it to referrals created via defer_referrer_credits, which cleanly separates it from siblings like apply_referral or list_referrals. The clarification that user_id is the REFERRED user removes the main ambiguity an agent would have.

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 clearly conditions use on a prior defer_referrer_credits application and states that repeats are safe, which tells the agent it need not guard against double-calls. It stops short of naming a full alternative branch (e.g., what to do if no deferral exists beyond the 404), so it is strong but not a complete when/when-not map.

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