Skip to main content
Glama

tito

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. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations declare destructiveHint=true, so the safety profile is already covered. The description adds genuinely non-redundant behavior: partial merge semantics and the non-obvious retire-via-end_at trick. It omits permission requirements and reversibility, keeping it at a 4.

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?

Two tight sentences plus an endpoint reference, front-loaded with the mutation semantics and the retire tip. No filler or restatement of the title.

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 with no output schema, the description covers the essentials: what changes, merge behavior, and a key edge case. Minor gaps remain around auth/account scoping (account_slug is only explained in the schema) and error behavior, but nothing an agent needs to invoke it is missing.

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 parameter is already documented with type, format and examples (e.g. decimal string value, ISO 8601 datetimes). The description only groups fields conceptually ('validity window', 'attached releases') and adds no syntax or constraint detail beyond the schema.

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 ('Change'), resource ('an existing discount code'), and enumerates the mutable surface (code, value, quantity, validity window, attached releases), plus the underlying PATCH endpoint. An agent can immediately tell this apart from the create/get/list siblings.

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 clear partial-update rule ('Only the fields you pass are sent') and a concrete operational recipe for the common retire case ('set end_at to now'). It does not name alternatives or explicit when-not-to-use conditions, 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.