Skip to main content
Glama

assign_code

Assign one available code to one named participant (regular or AMOE) of the SAME sweepstakes who holds no code yet. The code must be unassigned and not redeemed. This does not notify anyone — use send_code afterwards if the participant should receive it. Known API quirk: the echoed code comes back with AssignedTo null even when the assignment succeeded; do NOT report that field as the recipient — re-read with fetch_codes, which returns it correctly. Requires the Codes & Coupons module enabled on the account — on 403 "module not enabled", do NOT retry; tell the user to contact Sweeppea support.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coupon_tokenYesThe code token (UUID v4) of an unassigned, not-redeemed code
participant_tokenYesThe participant token (UUID v4) of a participant of the same sweepstakes who holds no code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior5/5

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

Annotations only declare it is a non-idempotent, non-destructive, open-world write. The description adds real behavioral context beyond that: no notifications are sent, the account must have the Codes & Coupons module enabled, and the API quirk where the echoed AssignedTo comes back null despite success. These are exactly the traits that would otherwise cause an agent to misreport results.

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?

Front-loaded with the action and preconditions, then routing guidance, then the API quirk and the failure-mode instruction. Every sentence carries actionable information and none is filler.

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?

Though there is no output schema, the description compensates by explaining the misleading return value and how to verify success with fetch_codes. Preconditions, side effects, permissions, and error handling are all covered, leaving nothing an agent needs to call it correctly.

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 both schema descriptions already state the UUID v4 format and the unassigned/not-redeemed/same-sweepstakes preconditions. The description largely restates those constraints rather than adding new syntax or semantics, so the baseline 3 is appropriate.

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 (assign) and resource (code) plus the exact state of both operands: one available code to one participant of the same sweepstakes holding no code. It is clearly distinguishable from siblings like unassign_code, redeem_code, and send_code, which are explicitly referenced.

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 explicit routing: it does not notify anyone, so use send_code afterwards if the participant should receive it, and re-read with fetch_codes rather than trusting the echo. It also handles the 403 'module not enabled' case by instructing not to retry and to escalate to support.

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