Skip to main content
Glama

Create the referral link

well_create_referral_code
Idempotent

Make the workspace's referral link when well_get_referral_code says it has none (has_link: false), and return it with how many people joined Well with it. A repeat call returns the same link (created: false).

The link lets someone open their OWN account on Well and counts them for this workspace; it gives no access to the workspace, so any member may make it, and the user's ask for their referral link is the consent. A demo workspace has no link (refusal: DEMO_WORKSPACE).

Input Schema

NameRequiredDescriptionDefault
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.

Output Schema

NameRequiredDescriptionDefault
errorNo
createdNoTrue when this call made the link, false when it returned the live one.
refusalNoPresent only when the call did nothing. DEMO_WORKSPACE: the workspace holds sample data, so it has no referral link. INSUFFICIENT_PERMISSIONS: only an owner or admin, or the member who made the link, may stop it.
successYes
workspace_idNo
people_joinedNoHow many people joined Well with this link: the people in the workspaces it brought in. Derived on each call; 0 when nobody did yet. Null when the count could not be read in time: give the link and say the count is not available right now, never 0.
referral_linkNoThe workspace's referral link. Anyone who opens it and signs up to Well counts for this workspace; it gives no access to the workspace. Give it to the user exactly as returned, alone on its line.
last_joined_atNoWhen the latest person joined with the link (ISO 8601), or null when nobody did yet.
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
people_joined_cappedNoTrue when the link brought in more workspaces than one count reads, so people_joined is a floor.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / last_joined_at / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / last_joined_at / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations declare idempotentHint=true, but the description goes further and tells the agent what that looks like in the response ('A repeat call returns the same link (`created: false`)'). It also discloses a permission model not in any structured field: the link grants no workspace access, so any member may create it, and the user's ask for their referral link is itself the consent. The one refusal path is named by code.

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?

Three short paragraphs, front-loaded with the trigger condition, then permissions, then the failure case. Every sentence carries a distinct fact (gate, return semantics, consent model, refusal) and none restates the name or title.

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 the full decision set for a low-risk write: when to call, what a retry does, who is authorized, and the sole refusal. An output schema exists, so the description is not obligated to enumerate return fields, and it correctly stops at the one behavior ('created: false') an agent must branch on.

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 description coverage is 100% and each of the four parameters carries rich documentation, so the schema already does the heavy lifting and baseline 3 applies. The description adds no parameter-level detail of its own; it neither mentions workspace_id selection nor the idempotency_key, though its idempotency narrative implies how that key is meant to behave.

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+resource ('Make the workspace's referral link') and immediately scopes it against a named sibling (well_get_referral_code with has_link: false). An agent can distinguish this from the read counterpart and from well_delete_referral_code without opening any schema.

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?

Gives an explicit precondition gate ('when well_get_referral_code says it has none (`has_link: false`)'), names the alternative that satisfies it, and states the one exclusion ('A demo workspace has no link (`refusal: DEMO_WORKSPACE`)'). Nothing is left to inference.

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