MAGENT

Emergency · LIVE

Major Depression Inventory

MDI

Map 12 caller-assigned Bech 2001 MDI integers (0-5 over the last 2 weeks) to ten DSM-IV/ICD-10 symptom items (appetite and psychomotor are each the published max of their pair) and return the 0-50 total and whether it meets this paper's optimal cutoff of 26.

LIVE $0.005 USDC GET /api/calc/mdi

Markdown: /docs/mdi.md · Canonical: https://magentlab.com/docs/mdi

Not a medical device. Not a diagnosis, dose, or listing recommendation.

What it computes

Map 12 caller-assigned Bech 2001 MDI integers (0-5 over the last 2 weeks) to ten DSM-IV/ICD-10 symptom items (appetite and psychomotor are each the published max of their pair) and return the 0-50 total and whether it meets this paper's optimal cutoff of 26.

When to use

When an agent has already assigned Bech 2001 MDI 0-5 integers for all 12 printed items and needs the published ten-item total and cutoff of 26, not a depression interview, PHQ-9, QIDS, or Hamilton depression.

When not to use

  • Not a medical device and not a depression diagnosis or treatment order.
  • magent does not administer a depression interview. Each of the 12 printed items is a caller-assigned integer 0-5 (0 at no time through 5 all the time, last 2 weeks). magent does not interpret the items.
  • This is Bech 2001 MDI only. Psychomotor is the maximum of restless and subdued; appetite is the maximum of reduced and increased appetite; the remaining eight items add as published. Total 0-50. magent does not score PHQ-9, QIDS, or Hamilton depression.
  • Bech 2001 estimated an optimal total-score cutoff of 26 and treated the total as a sufficient statistic. magent returns at_or_above_cutoff (score ≥26) only. It does not apply Olsen 2003 HAM-D mapped mild/moderate/severe bands, and it does not apply DSM-IV or ICD-10 diagnostic algorithms from this paper.

Formula

MDI = low_spirits + lost_interest + lack_of_energy + low_self_confidence + guilt + life_not_worth_living + concentration + max(restless, subdued) + sleep + max(reduced_appetite, increased_appetite); each caller-assigned 0-5; ten scored items; max 50; Bech 2001 optimal total-score cutoff 26

Citation

Title
The sensitivity and specificity of the Major Depression Inventory, using the Present State Examination as the index of diagnostic validity
Authors
Bech P, Rasmussen NA, Olsen LR, Noerholm V, Abildgaard W
Source
J Affect Disord. 2001;66(2-3):159-164
DOI
10.1016/s0165-0327(00)00309-8

Worked example

All items 0

Given: concentration=0guilt=0increased_appetite=0lack_of_energy=0life_not_worth_living=0lost_interest=0low_self_confidence=0low_spirits=0reduced_appetite=0restless=0sleep=0subdued=0

  1. Each scored item is 0 (psychomotor max 0, appetite max 0, remaining items 0)
  2. Score = 0 (max 50); at_or_above_cutoff false (Bech 2001 cutoff is 26)

Appetite and psychomotor are the max of each pair

Given: concentration=0guilt=0increased_appetite=1lack_of_energy=0life_not_worth_living=0lost_interest=0low_self_confidence=0low_spirits=0reduced_appetite=3restless=2sleep=0subdued=5

  1. psychomotor = max(2, 5) = 5 (not 2+5); appetite = max(3, 1) = 3 (not 3+1)
  2. Remaining items 0; score = 8; at_or_above_cutoff false

Bech 2001 cutoff 26

Given: concentration=0guilt=5increased_appetite=0lack_of_energy=5life_not_worth_living=1lost_interest=5low_self_confidence=5low_spirits=5reduced_appetite=0restless=0sleep=0subdued=0

  1. 5 + 5 + 5 + 5 + 5 + 1 + 0 + max(0, 0) + 0 + max(0, 0) = 26
  2. Score = 26 (max 50); at_or_above_cutoff true. No Olsen 2003 severity band.

Also searched as

  • MDI
  • Major Depression Inventory
  • Major Depression Index
  • Bech MDI
  • WHO MDI
  • MDI score
  • 10-item MDI
  • Bech 2001 depression

Try

Opens the live endpoint. Unpaid browser requests show the paywall; agents should send Accept: application/json.

/api/calc/mdi?low_spirits=0&lost_interest=0&lack_of_energy=0&low_self_confidence=0&guilt=0&life_not_worth_living=0&concentration=0&restless=0&subdued=0&sleep=0&reduced_appetite=0&increased_appetite=0

Full URL: https://api.magentlab.com/api/calc/mdi?low_spirits=0&lost_interest=0&lack_of_energy=0&low_self_confidence=0&guilt=0&life_not_worth_living=0&concentration=0&restless=0&subdued=0&sleep=0&reduced_appetite=0&increased_appetite=0

Call

Expect HTTP 402 until you retry with PAYMENT-SIGNATURE. Incomplete query params return HTTP 400 before any quote or charge.

curl -i -H "Accept: application/json" "https://api.magentlab.com/api/calc/mdi?low_spirits=0&lost_interest=0&lack_of_energy=0&low_self_confidence=0&guilt=0&life_not_worth_living=0&concentration=0&restless=0&subdued=0&sleep=0&reduced_appetite=0&increased_appetite=0"

Parameters

Name Type Required Description
low_spirits integer required Caller-assigned Bech 2001 MDI item 1 (integer 0-5): felt low in spirits or sad over the last 2 weeks (0 at no time, 1 some of the time, 2 slightly less than half of the time, 3 slightly more than half of the time, 4 most of the time, 5 all the time). Adds as published. magent does not interpret the item.
lost_interest integer required Caller-assigned Bech 2001 MDI item 2 (integer 0-5): lost interest in daily activities. Adds as published. magent does not interpret the item.
lack_of_energy integer required Caller-assigned Bech 2001 MDI item 3 (integer 0-5): lacking in energy and strength. Adds as published. magent does not interpret the item.
low_self_confidence integer required Caller-assigned Bech 2001 MDI item 4 (integer 0-5): felt less self-confident. Adds as published. magent does not interpret the item.
guilt integer required Caller-assigned Bech 2001 MDI item 5 (integer 0-5): bad conscience or feelings of guilt. Adds as published. magent does not interpret the item.
life_not_worth_living integer required Caller-assigned Bech 2001 MDI item 6 (integer 0-5): felt that life was not worth living. Adds as published. magent does not interpret the item.
concentration integer required Caller-assigned Bech 2001 MDI item 7 (integer 0-5): difficulty concentrating, for example when reading the newspaper or watching television. Adds as published. magent does not interpret the item.
restless integer required Caller-assigned Bech 2001 MDI item 8a (integer 0-5): felt very restless. The psychomotor item is the maximum of restless and subdued, not the sum. magent does not interpret the item.
subdued integer required Caller-assigned Bech 2001 MDI item 8b (integer 0-5): felt subdued or slowed down. The psychomotor item is the maximum of restless and subdued, not the sum. magent does not interpret the item.
sleep integer required Caller-assigned Bech 2001 MDI item 9 (integer 0-5): trouble sleeping at night. Adds as published. magent does not interpret the item.
reduced_appetite integer required Caller-assigned Bech 2001 MDI item 10a (integer 0-5): reduced appetite. The appetite item is the maximum of reduced_appetite and increased_appetite, not the sum. magent does not interpret the item.
increased_appetite integer required Caller-assigned Bech 2001 MDI item 10b (integer 0-5): increased appetite. The appetite item is the maximum of reduced_appetite and increased_appetite, not the sum. magent does not interpret the item.

Bulk (POST)

POST the same path with a JSON items array. The first item is the GET unit; each additional item is $0.002. Invalid items return HTTP 400 before settlement.

POST /api/calc/mdi Max 25 unit_amount + extra_item_amount * (n - 1) extra $0.002 PREVIEW

  • 1 to 25 items. Each item uses the same keys as the GET query parameters.
  • POST of 1 item costs the same as GET. Lists longer than 25: chunk into multiple POSTs. Extra items still execute; do not pad dummy rows.
  • The first invalid item fails the whole request (index in the 400 JSON). You are not charged.
  • HTTP 200 is {count, path, items}. Each items[i] is the GET 200 body for that row.
  • Catalog misses (empty matches, found=false) stay paid 200s inside that slot.
  • x402 resource URL is this path plus n and body_sha256. Browsers that prefer text/html get the same paywall as GET; Pay retries POST with the same items.

Example request (fixture)

{
  "items": [
    {
      "concentration": "0",
      "guilt": "0",
      "increased_appetite": "0",
      "lack_of_energy": "0",
      "life_not_worth_living": "0",
      "lost_interest": "0",
      "low_self_confidence": "0",
      "low_spirits": "0",
      "reduced_appetite": "0",
      "restless": "0",
      "sleep": "0",
      "subdued": "0"
    },
    {
      "concentration": "0",
      "guilt": "0",
      "increased_appetite": "0",
      "lack_of_energy": "0",
      "life_not_worth_living": "0",
      "lost_interest": "0",
      "low_self_confidence": "0",
      "low_spirits": "0",
      "reduced_appetite": "0",
      "restless": "0",
      "sleep": "0",
      "subdued": "0"
    }
  ]
}

Open bulk paywall →

Opens a two-item fixture on the API host. Unpaid browsers get the same MetaMask paywall as GET; Pay retries POST with those items.

Example 200 (fixture)

{
  "count": 2,
  "path": "/api/calc/mdi",
  "items": [
    {
      "components": [
        {
          "value": 0,
          "factor": "low_spirits",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "lost_interest",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "lack_of_energy",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "low_self_confidence",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "guilt",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "life_not_worth_living",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "concentration",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "psychomotor",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "appetite",
          "points": 0,
          "present": true
        }
      ],
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Bech P, Rasmussen NA, Olsen LR, Noerholm V, Abildgaard W",
        "doi": "10.1016/s0165-0327(00)00309-8",
        "id": "bech-2001",
        "pmid": "11578668",
        "source": "J Affect Disord. 2001;66(2-3):159-164",
        "title": "The sensitivity and specificity of the Major Depression Inventory, using the Present State Examination as the index of diagnostic validity"
      },
      "formula": "mdi",
      "formula_expression": "MDI = low_spirits + lost_interest + lack_of_energy + low_self_confidence + guilt + life_not_worth_living + concentration + max(restless, subdued) + sleep + max(reduced_appetite, increased_appetite); each caller-assigned 0-5; ten scored items; max 50; Bech 2001 optimal total-score cutoff 26",
      "max_score": 50,
      "score": 0,
      "at_or_above_cutoff": false,
      "appetite_points": 0,
      "psychomotor_points": 0
    },
    {
      "components": [
        {
          "value": 0,
          "factor": "low_spirits",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "lost_interest",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "lack_of_energy",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "low_self_confidence",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "guilt",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "life_not_worth_living",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "concentration",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "psychomotor",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "sleep",
          "points": 0,
          "present": true
        },
        {
          "value": 0,
          "factor": "appetite",
          "points": 0,
          "present": true
        }
      ],
      "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
      "citation": {
        "authors": "Bech P, Rasmussen NA, Olsen LR, Noerholm V, Abildgaard W",
        "doi": "10.1016/s0165-0327(00)00309-8",
        "id": "bech-2001",
        "pmid": "11578668",
        "source": "J Affect Disord. 2001;66(2-3):159-164",
        "title": "The sensitivity and specificity of the Major Depression Inventory, using the Present State Examination as the index of diagnostic validity"
      },
      "formula": "mdi",
      "formula_expression": "MDI = low_spirits + lost_interest + lack_of_energy + low_self_confidence + guilt + life_not_worth_living + concentration + max(restless, subdued) + sleep + max(reduced_appetite, increased_appetite); each caller-assigned 0-5; ten scored items; max 50; Bech 2001 optimal total-score cutoff 26",
      "max_score": 50,
      "score": 0,
      "at_or_above_cutoff": false,
      "appetite_points": 0,
      "psychomotor_points": 0
    }
  ]
}

Response

Field Type Description
formula string mdi
formula_expression string Exact expression used
score integer MDI points 0-50
max_score integer 50
at_or_above_cutoff boolean true iff score ≥ 26 (Bech 2001 optimal total-score cutoff). Not a diagnosis. Not Olsen 2003 HAM-D mapped mild/moderate/severe bands.
appetite_points integer Appetite item 0-5: maximum of reduced_appetite and increased_appetite, not the sum
psychomotor_points integer Psychomotor item 0-5: maximum of restless and subdued, not the sum
components array Ten scored DSM-IV/ICD-10 symptom points
citation object Bech et al. J Affect Disord 2001 citation
disclaimer string Not-a-device notice

Example JSON

Machine form of the same example. Frozen fixture. Not a live lookup.

{
  "components": [
    {
      "value": 0,
      "factor": "low_spirits",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "lost_interest",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "lack_of_energy",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "low_self_confidence",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "guilt",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "life_not_worth_living",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "concentration",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "psychomotor",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "sleep",
      "points": 0,
      "present": true
    },
    {
      "value": 0,
      "factor": "appetite",
      "points": 0,
      "present": true
    }
  ],
  "disclaimer": "Not a medical device. Deterministic published-formula or published-code output for autonomous agents. A licensed clinician remains responsible for patient care and billing submissions.",
  "citation": {
    "authors": "Bech P, Rasmussen NA, Olsen LR, Noerholm V, Abildgaard W",
    "doi": "10.1016/s0165-0327(00)00309-8",
    "id": "bech-2001",
    "pmid": "11578668",
    "source": "J Affect Disord. 2001;66(2-3):159-164",
    "title": "The sensitivity and specificity of the Major Depression Inventory, using the Present State Examination as the index of diagnostic validity"
  },
  "formula": "mdi",
  "formula_expression": "MDI = low_spirits + lost_interest + lack_of_energy + low_self_confidence + guilt + life_not_worth_living + concentration + max(restless, subdued) + sleep + max(reduced_appetite, increased_appetite); each caller-assigned 0-5; ten scored items; max 50; Bech 2001 optimal total-score cutoff 26",
  "max_score": 50,
  "score": 0,
  "at_or_above_cutoff": false,
  "appetite_points": 0,
  "psychomotor_points": 0
}

Client errors (HTTP 400)

Invalid params return 400 without charge. Shared HTTP 402 and 503 meanings: Payments.

HTTP Code When
400 invalid_mdi Each Major Depression Inventory item must be an integer in the Bech 2001 published range. Returned before settlement; you are not charged.
400 invalid_items POST body must be a JSON object with only an items array Returned before settlement; you are not charged.
400 invalid_item_count items must be an array of 1 to 25 objects Returned before settlement; you are not charged.
400 invalid_item each items entry must be a JSON object Returned before settlement; you are not charged.

Related tools

  • PHQ-9 — Sum nine caller-assigned Kroenke 2001 PHQ-9 integers (0-3) and return the published total (max 27), severity cutpoints, and ≥10 screen.
  • QIDS — Map 16 caller-assigned Rush 2003 QIDS-SR integers (0-3) to nine DSM-IV domains (sleep, appetite/weight, and psychomotor are each the published max of their items) and return the 0-27 total and IRT severity band.
  • GAD-7 — Sum seven caller-assigned Spitzer 2006 GAD-7 integers (0-3) and return the published 0-21 total, 5/10/15 severity cuts, and ≥10 case-finding flag.

Payment

Unpaid requests return HTTP 402 even if query parameters or POST items are missing or invalid, so CDP and agents can index the path. After a PAYMENT-SIGNATURE, invalid params return HTTP 400 JSON before settlement. magent does not charge. Fix the params, then request a new 402 quote for that complete URL. Catalog misses (empty matches, found=false) are valid paid 200s. Unpaid valid requests return HTTP 402 with a base64 PAYMENT-REQUIRED header. HTTP 503 is not a new quote: retry the same PAYMENT-SIGNATURE. Full handshake and shared payment errors: Payments. Stdio MCP: /docs/mcp.

Guarantees

  • HTTP 402 is unpaid, including a missing query. After PAYMENT-SIGNATURE, invalid parameters return HTTP 400 before settlement. You are not charged. HTTP 402 never includes the tool JSON.
  • exact: settlement finishes before the tool (paymentFlow upfront). batch-settlement: verify/deposit before the tool; chargedCumulativeAmount commits after HTTP 2xx. Uncertain or failed settlement fails closed (HTTP 503). Retry the same PAYMENT-SIGNATURE.
  • HTTP 402 is unpaid only. Do not sign a second authorization because of a 503.
  • Execution is timeout-bounded and concurrency-capped.
  • Calculator inputs are stored encrypted for allowlisted operators (Magent Console). They are not in public logs, SSH lookups, catalog, or rollups. Request logs store path without query.