Skip to main content
Glama
kuyen-labs

Fuul MCP Server

by kuyen-labs

use_referral_code

Redeem a referral code by providing the code, user identifier, and type. Supports dry-run validation before confirmation.

Instructions

Redeem a referral code for a user: PATCH /api/v1/referral_codes/:code/use. Creates referral_code_uses, increments actual_uses, sets user_referrers with source=code_redemption (GET /referral_codes/status → referred:true). Referrer is the code owner (do not pass referrer_identifier). Requires user has no existing referrer unless service_role idempotent replay of the same code. No wallet signature with service_role. 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: {"referral_code":"PROMO2024","user_identifier":"0xUser...","user_identifier_type":"evm_address","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.
referral_codeYesReferral code string (path segment). Referrer is inferred from the code owner on the server.
user_identifierYes
user_identifier_typeYes
Behavior5/5

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

Even without annotations, the description fully discloses side effects (creates referral_code_uses, increments actual_uses, sets user_referrers), idempotency behavior under service_role, and auth constraints (no Dashboard OAuth, no wallet signature with service_role). This exceeds minimum transparency requirements.

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 information-dense and front-loaded with the core action, but it contains some technical jargon and could be streamlined slightly. Nevertheless, every sentence adds value.

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?

Given no output schema, the description thoroughly explains return behavior (referral status endpoint), acknowledges the two-step commit pattern, covers auth, and mentions idempotency. It fully addresses the tool's complexity.

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?

While the input schema covers 4 of 6 parameters with descriptions, the tool description adds critical context for referral_code (owner is referrer) and explains the dry_run/confirmed workflow. However, user_identifier and user_identifier_type are not elaborated beyond the schema example.

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 the tool's action ('Redeem a referral code for a user') and includes the HTTP endpoint. This verb+resource structure effectively distinguishes it from siblings like remove_user_from_referral_code or swap_user_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?

The description explicitly specifies when to use the tool (user has no existing referrer) and when not (user already has referrer unless service_role replay). It also clarifies authentication requirements (project API key only) and the dry_run-then-confirm pattern, providing clear decision-making context.

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