Skip to main content
Glama

Update a discount code

tito_update_discount_code
Destructive

Change an existing discount code — its code, value, quantity, validity window or attached releases. Only the fields you pass are sent. To retire a code without deleting it, set end_at to now. Tito: PATCH /:account/:event/discount_codes/:discount_code_id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeNoNew code text.
typeNoNew discount type.
valueNoNew amount off per ticket as a decimal string, e.g. "15.0".
end_atNoWhen the code stops working (ISO 8601 datetime).
quantityNoHow many tickets can use this code in total.
start_atNoWhen the code starts working (ISO 8601 datetime).
event_slugYesThe event slug (the second part of https://ti.to/<account>/<event>), e.g. 2026.
release_idsNoRelease ids the code applies to (empty = all).
account_slugNoThe account slug (the first part of https://ti.to/<account>/<event>). Optional if TITO_ACCOUNT is set; tito_whoami lists the accounts this token can reach.
reveal_secretNoReveal secret releases when the code is applied. Default false.
discount_code_idYesThe discount code's numeric id.
only_show_attachedNoWhen the code is applied, show only the releases attached to it. Default false.
max_quantity_per_releaseNoThe discount applies to at most this many tickets per release.
min_quantity_per_releaseNoThe discount applies only if at least this many tickets are selected.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations only declare destructiveHint=true, so the description's clarification that this is a partial PATCH and that unspecified fields are left untouched is genuinely additive — it tells the agent unlisted fields will not be cleared. The retirement hint via end_at is another useful behavioral fact. Authorization/prerequisite details and any consequence of changing code text on already-issued tickets are not covered.

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 sentences, front-loaded with the mutation scope, then the merge semantics, then the retirement recipe and endpoint. Nothing is redundant and no sentence is filler.

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 14-parameter mutation tool with no output schema, the description supplies the two things the schema cannot: partial-update behavior and a retirement workflow. It omits auth/prerequisite context and what a successful or failed update returns, but the rich schema carries the rest.

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%, so every one of the 14 parameters is already documented with type, bounds, and meaning. The description narrates a few field names (code, value, quantity, validity window, releases) but adds no format, constraint, or interaction detail beyond the schema, which is the correct baseline-3 outcome.

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 (Change) and resource (an existing discount code) and enumerates the editable surface — code, value, quantity, validity window, attached releases — so an agent knows exactly what this tool mutates. It is distinguishable from tito_create_discount_code and tito_get_discount_code by the word 'existing', though it never names those siblings explicitly.

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?

"Only the fields you pass are sent" establishes partial-update semantics, and "To retire a code without deleting it, set end_at to now" gives a concrete workflow for a common intent. No explicit when-not or alternative-tool routing is offered, so it stops short of a 5.

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.