Skip to main content
Glama

update_code_settings

Idempotent

Change how a sweepstakes hands out codes. Partial update — only the fields you send change. Read get_code_settings first. The registration modes are integers: 0 none, 1 assign an existing code, 2 generate a new code, 3 ask the participant for their code. Modes reject_invalid_coupon_code, coupon_code_case_sensitive, invalid_coupon_code_error_message and coupon_request_field_label only matter in mode 3. NOTE: coupon_code_type is an INTEGER here (1 numeric, 2 alphanumeric) while generate_codes uses the STRING type ("alphanumeric" / "numeric") — do not copy a value between the two. The three text fields accept null, which CLEARS them. 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_code_typeNoGenerated codes: 1 numeric, 2 alphanumeric. An INTEGER — generate_codes uses a string for the same idea
sweepstakes_tokenYesThe sweepstakes token (UUID v4) of a sweepstakes of your account
coupon_code_lengthNoGenerated code length, 4 to 20
coupon_code_case_sensitiveNoMode 3 only: compare codes case-sensitively
coupon_request_field_labelNoMode 3 only: label of the code field. Plain text, max 200. Empty uses the default label. null CLEARS it
reject_invalid_coupon_codeNoMode 3 only: refuse the registration when the code is invalid
coupon_amoe_page_registrationNoAMOE page: same values as coupon_entry_page_registration
coupon_thank_you_page_messageNoMessage on the thank-you page. Plain text, max 1,000. null CLEARS it
coupon_entry_page_registrationNoEntry page: 0 none, 1 assign an existing code, 2 generate a new code, 3 ask the participant for their code
invalid_coupon_code_error_messageNoMode 3 only: message shown for an invalid code. Plain text, max 500. null CLEARS it
send_coupon_code_to_participant_by_smsNoText the code to the participant
display_coupon_code_on_confirmation_pageNoShow the code on the confirmation page
send_coupon_code_to_participant_by_emailNoEmail the code to the participant
what_to_do_when_no_coupon_code_is_availableNo0 nothing, 1 generate a new code

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare the mutation/idempotent profile, and the description adds substantial context beyond them: partial-update semantics ('only the fields you send change'), null-as-clear semantics for the three text fields, the Codes & Coupons module prerequisite, and an explicit no-retry instruction on 403. The cross-tool type warning (integer here vs string in generate_codes) is exactly the kind of behavioral trap an agent needs.

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?

Front-loaded with purpose and the partial-update rule, then escalates to conditionals and the type-mismatch warning. Dense and mostly waste-free, though the mode enumeration partially duplicates the schema descriptions and the note sentence is long.

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?

For a 14-parameter mutation tool with no output schema, the description covers mutation semantics, field-clearing behavior, conditional field applicability, account-level prerequisites, and cross-tool type hazards. An agent has everything needed to call it correctly; return values need not be explained.

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 goes beyond it by decoding the registration-mode integers, stating which fields are conditional on mode 3, and warning that coupon_code_type uses an integer here while generate_codes uses a string. The null-clearing behavior is repeated from the schema, but the conditional relationships are genuine added meaning.

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 and resource ('Change how a sweepstakes hands out codes'), clearly distinguishing this settings-mutation tool from siblings like update_entry_settings, update_code, and create_codes. The scope is immediately understandable without opening the schema.

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 a concrete prerequisite ('Read get_code_settings first') and conditional guidance for mode 3 fields, plus what to do on a 403 module error. It stops short of naming an alternative tool for related edits (e.g. generate_codes vs this), so it is strong but not exhaustive routing guidance.

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