# Check a discount code

`check_discount_code`

- Read-only

Checks whether a discount code is usable by this account right now and what it is worth — a fixed amount or a percentage, and the exam categories it applies to. It reserves nothing, uses nothing up and changes nothing; the code is still applied on the panel’s payment screen. A code that is unknown, expired, used up or not for this account comes back as valid:false rather than an error, so ask once and report the answer.

- **For**: Students, teachers and partners
- **Needs**: Read access (`mcp:read`)
- **What it changes**: **Read-only.** It only reads. Nothing changes.

## Inputs

- `brand`string

  Which olympiad this is about. Required unless the connection covers exactly one, in which case that one is used.

  one of`coding``gmath``hilingua``neo``stem`
- `code`stringrequired

  The code exactly as the person has it.

  min length`1`max length`64`
- `categories`array of string

  Optional: the exam category ids being bought, from find_exams_for_me or list_study_materials. Narrows the check to those categories.

  max items`20`

The server refuses a call that carries any field not listed here, and says which one.

## Answers instead of a result

What the tool says when it cannot do what was asked, and what to do about it.

- **`not_connected`**
- **`insufficient_scope`**
- **`rate_limited`**
- **`writes_disabled`**
- **`temporarily_unavailable`**
- **`upstream_error`**
- **`brand_not_allowed`**
- **`role_required`**
- **`tenant_account_missing`**
