# MIDAS Score Calculator (magent)

> MIDAS Score Calculator (magent) 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).

Computes the Stewart 1999 MIDAS (Migraine Disability Assessment) total score and disability grade from five caller-assigned 3-month day counts.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/midas
- 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/midas-score-calculator-magent-3bff5fe7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_gF3Sr_a9XTZgGE5pvxWzy

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 midas-score-calculator-magent-3bff5fe7
```

Example prompt: Calculate the MIDAS score for a patient who missed 8 days of paid work, had 5 days of reduced work productivity, missed 3 days of household work, had 4 days of reduced household productivity, and missed 2 days of family or social activities in the last 3 months.

## When to prefer this

Use this endpoint when you need a standardized, validated MIDAS disability score and grade from five pre-collected 3-month activity-impact day counts. Prefer it over manual calculation to avoid arithmetic errors, and when you need a structured grade label (I–IV) for clinical documentation, research, or triage workflows. Not appropriate for diagnosing migraine, prescribing triptans or prophylaxis, or computing psychiatric screening scores like GAD-7 or PHQ-9.

## Known failure modes

- Missing any of the five required query parameters returns a validation error
- Values outside the 0–90 integer range per item may be rejected or produce unexpected scores
- Double-counted days between missed and reduced categories are not de-duplicated by the API — caller must handle this
- Non-integer inputs will fail schema validation
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Stewart 1999 MIDAS from five caller-assigned 3-month day counts: missed paid work/school, work/school ≥50% reduced, missed household work, household ≥50% reduced, missed family/social/leisure. Each 0-90; total 0-450. magent does not include questions A or B and does not assign or de-duplicate days. Grades I 0-5 little/minimal, II 6-10 mild, III 11-20 moderate, IV ≥21 severe. Not a migraine diagnosis, not a triptan/prophylaxis order, not GAD-7 or PHQ-9.

## Output

Returns the MIDAS total score (integer, 0–450, sum of the five input day counts) and the corresponding disability grade: Grade I (0–5, little/minimal), Grade II (6–10, mild), Grade III (11–20, moderate), or Grade IV (≥21, severe). Does not diagnose migraine or recommend treatment.

## 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": [
      "missed_work_days",
      "reduced_work_days",
      "missed_household_days",
      "reduced_household_days",
      "missed_social_days"
     ],
     "properties": {
      "missed_work_days": {
       "type": "integer",
       "description": "Caller-assigned MIDAS item 1 (integer 0-90): days of missed paid work or school in the last 3 months. magent does not assign the count."
      },
      "reduced_work_days": {
       "type": "integer",
       "description": "Caller-assigned MIDAS item 2 (integer 0-90): days work or school productivity was reduced by half or more in the last 3 months. Do not double-count days already in missed_work_days; the caller assigns the count. magent does not de-duplicate days."
      },
      "missed_social_days": {
       "type": "integer",
       "description": "Caller-assigned MIDAS item 5 (integer 0-90): days of missed family, social, or leisure activities in the last 3 months. magent does not assign the count."
      },
      "missed_household_days": {
       "type": "integer",
       "description": "Caller-assigned MIDAS item 3 (integer 0-90): days household work was not done in the last 3 months. magent does not assign the count."
      },
      "reduced_household_days": {
       "type": "integer",
       "description": "Caller-assigned MIDAS item 4 (integer 0-90): days household productivity was reduced by half or more in the last 3 months. Do not double-count days already in missed_household_days; the caller assigns the count. magent does not de-duplicate days."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/midas-score-calculator-magent-3bff5fe7/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)
