# magent mTOQ-4 Migraine Treatment Optimization Questionnaire Calculator

> magent mTOQ-4 Migraine Treatment Optimization Questionnaire Calculator is a paid API for AI agents from api.magentlab.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Calculates the Lipton 2015 mTOQ-4 score (0–8) from four caller-assigned migraine treatment response frequency items and returns a categorical treatment quality band

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/mtoq_4
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/magent-mtoq-4-migraine-treatment-optimization-questionnaire-calculator-c1f75e12
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_dp1d0x2sdoJ79EetPHegX

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability magent-mtoq-4-migraine-treatment-optimization-questionnaire-calculator-c1f75e12
```

Example prompt: Calculate the mTOQ-4 migraine treatment score for a patient whose responses are: pain-free within 2 hours = half_or_greater, one dose keeps headache away 24 hours = less_than_half, comfortable enough to plan daily activities = rarely, in control enough to return to normal function = half_or_greater.

## When to prefer this

Use this endpoint when you need a fast, deterministic computation of the validated Lipton 2015 mTOQ-4 four-item score from pre-collected patient frequency responses. Prefer this over manual summation to avoid arithmetic errors and ensure correct band classification. This is specifically the 4-item version — not the 19-item or 6-item mTOQ variants. The caller must already have the four frequency responses; this endpoint does not conduct patient interviews or support diagnostic or prescribing workflows.

## Known failure modes

- Missing any of the four required query parameters returns a validation error
- Invalid enum values (e.g. 'sometimes' instead of 'less_than_half') cause a 400 bad request
- Network or payment authorization failure returns a 402 or connection error
- Passing non-GET HTTP method to this endpoint returns an error

## How this service works

Lipton 2015 mTOQ-4 from four caller-assigned frequency items: pain-free within 2 hours, one dose keeps headache away ≥24 hours, comfortable enough to plan daily activities, in control enough to return to normal function. Each never=0, rarely=0, less_than_half=1, half_or_greater=2. Sum 0-8. Bands very_poor 0, poor 1-5, moderate 6-7, maximum 8. magent does not interview the patient. Not a diagnosis, not an abortive-drug order, not the 19-item or 6-item mTOQ.

## Output

Returns the computed mTOQ-4 total score (integer 0–8) and a categorical band label: very_poor (0), poor (1–5), moderate (6–7), or maximum (8), derived from summing the four frequency items where never/rarely=0, less_than_half=1, half_or_greater=2.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "headers": {
     "type": "object",
     "additionalProperties": {
      "type": "string"
     }
    },
    "queryParams": {
     "type": "object",
     "required": [
      "pain_free_2h",
      "sustained_24h",
      "able_to_plan",
      "in_control"
     ],
     "properties": {
      "in_control": {
       "enum": [
        "never",
        "rarely",
        "less_than_half",
        "half_or_greater"
       ],
       "type": "string",
       "description": "Caller-assigned Lipton 2015 mTOQ-4 item 4. After taking your migraine medication, do you feel in control of your migraines enough so that you feel you can return to normal function? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient."
      },
      "able_to_plan": {
       "enum": [
        "never",
        "rarely",
        "less_than_half",
        "half_or_greater"
       ],
       "type": "string",
       "description": "Caller-assigned Lipton 2015 mTOQ-4 item 3. Are you comfortable enough with your migraine medication to be able to plan your daily activities? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient."
      },
      "pain_free_2h": {
       "enum": [
        "never",
        "rarely",
        "less_than_half",
        "half_or_greater"
       ],
       "type": "string",
       "description": "Caller-assigned Lipton 2015 mTOQ-4 item 1. After taking your migraine medication, are you pain-free within 2 hours for most attacks? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient."
      },
      "sustained_24h": {
       "enum": [
        "never",
        "rarely",
        "less_than_half",
        "half_or_greater"
       ],
       "type": "string",
       "description": "Caller-assigned Lipton 2015 mTOQ-4 item 2. Does one dose of your migraine medication usually relieve your headache and keep it away for at least 24 hours? never=0, rarely=0, less_than_half=1, half_or_greater=2. magent does not interview the patient."
      }
     }
    }
   },
   "additionalProp
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-mtoq-4-migraine-treatment-optimization-questionnaire-calculator-c1f75e12/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.magentlab.com](https://www.zero.xyz/host/api.magentlab.com/llms.txt)
