Skip to main content
Glama
kuyen-labs

Fuul MCP Server

by kuyen-labs

swap_user_referral_code

Swap a user's referral code by removing them from an existing code and assigning them to a new one. Validate changes with a dry run before committing the mutation.

Instructions

Move a user between referral codes with full redemption semantics: DELETE from from_referral_code then PATCH /api/v1/referral_codes/:to_referral_code/use (not atomic). Step 1 tolerates already-removed 422s (e.g. user never had a prior code). Step 2 assigns to the owner of to_referral_code — there are no to_referrer_* params. If PATCH /use fails after DELETE, response has partial:true with use_error; complete with use_referral_code or update_user_referrer. Legacy PUT-only users (user_referrers without referral_code_use) may block step 2 with "User already has a referrer" — clear with delete_user_referrer first when appropriate. For first assign with no prior code, use use_referral_code directly. Requires service_role project API key. Auth: project API key only (pass project_api_key or set env FUUL_MCP_PROJECT_API_KEY). Dashboard OAuth from fuul-mcp login is not accepted on these routes. dry_run then confirmed. Example dry_run: {"user_identifier":"0xUser...","user_identifier_type":"evm_address","from_referral_code":"OLD","from_referrer_identifier":"0xOldKol...","from_referrer_identifier_type":"evm_address","to_referral_code":"NEW","dry_run":true}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_api_keyNoProject API key used as Bearer for this request. Falls back to FUUL_MCP_PROJECT_API_KEY when omitted.
dry_runNoIf true, validate and return a preview only; no server mutation.
confirmedNoMust be true to perform the mutation after reviewing dry_run output.
user_identifierYes
user_identifier_typeYes
from_referral_codeYes
from_referrer_identifierYesWallet of the owner of from_referral_code.
from_referrer_identifier_typeYes
to_referral_codeYesTarget referral code. Step 2 PATCH /use assigns the user to this code owner (no separate to_referrer fields).
Behavior5/5

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

With no annotations, the description fully covers non-atomicity, partial failure responses (partial:true), authentication requirements (project API key only), error handling (422 tolerance), and dry_run pattern. Contradiction: 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?

The description is dense but front-loaded with the core verb and outcome. Every sentence adds value, though it could be structured with bullet points for easier parsing.

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?

Covers response format (partial:true, use_error/use_referral_code), edge cases (legacy users, first assign), auth method, and dry_run workflow—comprehensive for a complex mutation tool without output schema.

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?

Description adds critical context beyond the schema, e.g., explaining step 2 assigns to to_referral_code owner and clarifying project_api_key fallback. Schema coverage is 56%, and the description partially compensates by embedding parameter meanings in the narrative.

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?

The description clearly states 'Move a user between referral codes' and details the two-step process (DELETE then PATCH), distinguishing it from siblings like use_referral_code and remove_user_from_referral_code.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly advises when to use alternatives: 'For first assign with no prior code, use use_referral_code directly.' Also instructs to clear legacy blockers with delete_user_referrer, providing clear when-to-use and when-not-to-use guidance.

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/kuyen-labs/mcp_server'

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