Skip to main content
Glama
thenavidm
by thenavidm

Create a referrals embed token

create_referrals_embed_token
Destructive

Generate a referrals embed token by resolving an existing enrollment or creating one from partner email. Returns a token for embedding referral programs.

Instructions

Create a referrals embed token for the given partner/tenant. The endpoint first attempts to locate an existing enrollment using the provided tenantId. If no enrollment is found, it resolves the partner by email and creates a new enrollment as needed. This results in an upsert-style flow that guarantees a valid enrollment and returns a usable embed token.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
accountNoExact configured private workspace profile label; not a tenant or provider account ID.
confirmNoMust be true for the requested mutation or exclusive private output file.
partnerNo
payloadNoComplete native JSON body; do not mix with body flags or payload_file. Arrays use repeated JSON object flags or a whole native array in a private file.
tenantIdNo
partnerIdNo
output_fileYesRequired absolute new private file. Exclusive 0600 creation; never overwrites or echoes PNG/embed credentials.
payload_fileNoAbsolute regular non-symlink JSON body file, at most 1 MiB. Cannot mix with payload/body flags.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructive/non-idempotent/open-world behavior, but the description adds a genuinely useful side-effect disclosure: this is an upsert that may silently create a new enrollment when none exists. It omits auth/permission requirements and the confirm gating, keeping it short of a 5.

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?

Three sentences, front-loaded with the action, then the resolution logic, then the outcome. No filler, though the final 'guarantees a valid enrollment and returns a usable embed token' is slightly redundant with the earlier upsert description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-param tool with nested objects and no output schema, the description covers the core flow but leaves out the required output_file's exclusive-file semantics, the confirm gating, and how the token is delivered. Adequate but with clear gaps.

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 63% and the description adds real meaning for tenantId (used to locate an existing enrollment) and the partner email (used to resolve the partner). However, key params like account, confirm, output_file, payload, and payload_file receive no explanation beyond the schema, so it only partially compensates.

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 ('Create a referrals embed token') and then details the exact resolution flow (enrollment lookup by tenantId, fallback to partner email, upsert). No sibling tool does anything comparable, so the agent can place it immediately.

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

Usage Guidelines3/5

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

The description explains the internal two-path logic (existing enrollment vs create-new), which implies the input conditions, but it never says when to prefer this tool, what prerequisites it has, or what it replaces. Usage is inferable rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.