Skip to main content
Glama

save_referral_settings

Create or update a referral program: credits awarded to the referrer and to the referred user. With credit_type_id this writes THAT credit type's program (creating it if needed); without it, the project's default program. Only fields you pass change. 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)
is_activeNoEnable/disable the program
is_defaultNotrue makes this program the default — the one requests without credit_type_id use (only true is accepted)
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 to write (and award)
referee_creditsNoCredits for the referred user
referrer_creditsNoCredits for the referrer

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/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 well: it discloses the 1 CRD cost per call, that the charge applies even to rejected calls, that a 429 RATE_LIMITED is free, and that error results carry a request_id to quote to support. This is exactly the behavioral context an agent needs before invoking a paid mutation.

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?

Dense but front-loaded: purpose first, then the credit_type_id branch, then update semantics, then cost/error behavior. Every sentence carries operational information with 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?

For a paid mutation with no annotations and no output schema, the description covers cost, error handling, and update semantics thoroughly. It stops short of describing what a successful response contains, which is a minor gap given no output schema exists.

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?

Schema coverage is 100%, so baseline is 3, but the description adds real meaning beyond the schema: the credit_type_id vs default-program distinction and the create-if-needed behavior, plus the partial-update rule that governs all optional fields.

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 pair (create or update) and resource (referral program) plus what the program contains (credits to referrer and referred user). It is clearly the write counterpart to get_referral_settings among the siblings.

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?

Explains the key branching condition: with credit_type_id it writes that credit type's program (creating if needed), without it the project default. It also clarifies partial-update semantics ('Only fields you pass change'). It does not explicitly name get_referral_settings as the read alternative, so not a 5.

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