Skip to main content
Glama

Retrieve Or Create Business Referral Code

retrieve_or_create_community_referral_code

Retrieve or create the referral code for a managed community. Business and community refer to the same thing and are interchangeable. Before offering this action or requesting its inputs, check business permissions. FREE businesses cannot use this tool, regardless of individual feature rows. Call check_business_tool_access before collecting inputs. Show any grace-period warning and verified resubscribe link before continuing, and never proceed when access is blocked.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "communityId": "<communityId>"
    },
    "name": "retrieve_or_create_community_referral_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
communityIdYesNas.com business (community) ID. Use an ID returned by list_businesses or another Nas.com tool; never invent one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / communityId / description
      Added value: +"Nas.com business (community) ID. Use an ID returned by list_businesses or another Nas.com tool; never invent one."
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations declare readOnlyHint=false, destructiveHint=false, openWorldHint=false, so the agent already knows this may write but is not destructive and is closed-world. The description adds real behavioral context: a FREE-plan hard block, grace-period warnings plus resubscribe link, and a required permission gate. It does not explain what happens when a code already exists versus being created, i.e. the create-vs-retrieve side effect implied by the name.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded, which is good, but the rest is a dense run-on of access-gating instructions with redundancy ('check business permissions' then 'call check_business_tool_access'). The terminology-equivalence sentence is useful but placed awkwardly before the constraints.

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 one-parameter tool with no output schema, the definition covers the preconditions, the plan-level hard block, and the mandatory gate call. It is complete enough to invoke safely; only the retrieve-versus-create outcome behavior is unstated.

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 coverage is 100% and the single communityId parameter is documented with source guidance (use an ID from list_businesses, never invent one). The description adds nothing beyond that about the parameter, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb pair and resource: retrieve or create the referral code for a managed community. It also disambiguates terminology (business = community), which helps distinguish it from create_my_referral_code. However it never contrasts itself with the near-identical sibling retrieve_or_create_business_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?

Gives concrete preconditions: check business permissions, call check_business_tool_access before collecting inputs, FREE businesses cannot use it, and never proceed when access is blocked. The gating tool is named explicitly. What's missing is when to pick this versus the business-named sibling or get_referral_code_details.

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