Tool name:
shopify_discount_config_schema · Previously: get_aiod_context · Read-only, touches no store dataWhen to use it
Before writing any configuration, every time. These shapes belong to AIOD. They are not Shopify’s native discount API shapes, and they cannot be worked out from them. A guessed configuration gets rejected, not quietly corrected — so reading first is faster than guessing and retrying. This is static reference text. It reads nothing from the store.Parameters
The sections
What comes back
context is Markdown reference text, not JSON. It comes in sections because the whole thing is several times larger than one tool response can carry.
The templates
Each contract gives you the template’s id, its discount type, exactly which fields you may set, any values that are fixed for you, and its constraints.Upsell is a real AIOD template, but it has no contract and no editable fields, so no tool can create or edit it. When Upsell is the right answer, say so and point the merchant at setting it up by hand — don’t force the request into a different template.
Things to watch out for
- Read
contracts_1before choosing, and read the chosen template’s contract before writing a single field. - Only fields on a template’s allowlist survive. Everything else is silently dropped before validation — which is how an edit ends up rejected for “changing nothing”.
- Condition and reward syntax is not in the contracts. It’s in
conditionsandactions_and_rules. Fetch those when a simulation failure names a field shape.

