Skip to main content
Glama

get_referral_code

Read-only

Get the referral code and URL for a specific vendor. If you are an authenticated agent (registered via register_agent), the request is recorded against your agent. Requesting a code does not itself earn a share of any commission: a commission is credited to the agent that submitted the code it was reported against, because showing a code to a user is not an event we can observe. Unauthenticated calls still return the code. The response always states whether the request was recorded and, when it was not, why.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vendorYesVendor name to get the referral code for (e.g. 'Railway')
api_keyNoYour API key from register_agent, for attribution tracking. Optional — unauthenticated calls still return the code.

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Added

TDQS

A3.8/5.0
Behavior1/5

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

The description is transparent about the request being 'recorded against your agent' for authenticated calls, which is a side effect. However, the annotations declare readOnlyHint=true, meaning the tool should not modify state. This directly contradicts the described recording behavior, so this dimension must score 1.

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 core purpose is front-loaded, and each sentence contributes either a usage condition, side effect, commission clarification, or response guarantee. The commission explanation is somewhat lengthy but earns its place by preventing a plausible misuse.

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?

With no output schema, the description still tells the agent what to expect: the referral code, URL, and whether the request was recorded, plus why if not. It also covers authenticated and unauthenticated behavior, making the tool fully invocable without additional information.

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 the baseline is 3. The description adds value by explaining the consequence of providing api_key: the request is recorded for attribution, while unauthenticated calls still return the code. This goes beyond the schema's basic optional-field note.

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 opens with a specific verb and resource: 'Get the referral code and URL for a specific vendor.' It also distinguishes itself from sibling tools by clarifying that requesting a code does not earn a commission, which differentiates it from submit_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 Guidelines4/5

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

Provides clear context on when to use the tool: for a specific vendor, with or without authentication, and includes a when-not statement about not earning commission. It does not explicitly name alternative tools, but the sibling list makes the intended alternatives apparent.

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.

TDQS

A4/5.0
Disambiguation3/5

The discovery-oriented tools—search_deals, compare_vendors, track_changes, and plan_stack—overlap in purpose and can be confused, especially for queries like 'What's cheaper than Vercel?' or 'Are free tiers being removed?'. The referral and account tools are clearly distinct, but the overlapping query surface lowers the overall disambiguation quality.

Naming Consistency4/5

Most tools follow a consistent verb_noun pattern such as check_balance, submit_referral_code, and request_payout. Two tools deviate: 'leaderboard' is a bare noun and 'my_referral_codes' uses a possessive prefix, creating minor inconsistency.

Tool Count5/5

Twelve tools is well within the ideal range and each tool covers a meaningful part of the AgentDeals domain: deal discovery, referral management, agent registration, payouts, and social routing. None of the tools feel redundant or extraneous.

Completeness4/5

The tool surface covers the main agent lifecycle well: registration, referral code submission and retrieval, balance checking, payouts, and friend management. Minor gaps exist—there is no way to update or remove a submitted referral code, and the payout address must be configured via an out-of-band API endpoint.