# magent Hamilton Anxiety Scale (HAM-A) Calculator

> magent Hamilton Anxiety Scale (HAM-A) 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).

Computes the Hamilton 1959 HAM-A total anxiety score (0–56) from 14 caller-assigned subscale ratings, without applying unofficial severity cutoffs or performing patient interviews.

## Facts

- Endpoint: GET https://api.magentlab.com/api/calc/hamilton_anxiety
- 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-hamilton-anxiety-scale-ham-a-calculator-aa2c6c95
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lreWdhwc_o_VoctA3iDbK

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-hamilton-anxiety-scale-ham-a-calculator-aa2c6c95
```

Example prompt: Calculate the HAM-A total score for a patient whose clinician assigned these Hamilton 1959 ratings: anxious mood 2, tension 3, fears 1, insomnia 2, intellectual 1, depressed mood 2, somatic muscular 2, somatic sensory 1, cardiovascular 1, respiratory 1, gastrointestinal 2, genitourinary 0, autonomic 2, and interview behavior 2.

## When to prefer this

Use this endpoint when you need a standards-compliant, reproducible Hamilton 1959 HAM-A total score from clinician-assigned subscale ratings in an automated pipeline, without needing the endpoint to conduct or interpret patient interviews. Prefer it over manual summation when auditability, consistency, and API-level logging of the 14-item input set matter. Do not use it as a diagnostic tool or medical device — it is a calculation utility only.

## Known failure modes

- Missing required subscale parameter — returns validation error
- Subscale value outside 0–4 integer range — returns validation error
- Non-integer value supplied for a subscale — returns schema error
- Network timeout or API unavailability — returns HTTP 5xx error
- Payment not attached or insufficient — returns HTTP 402 Payment Required

## How this service works

Hamilton 1959 HAM-A: 14 caller-assigned integers 0-4 (0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe) for anxious mood, tension, fears, insomnia, intellectual, depressed mood, somatic muscular, somatic sensory, cardiovascular, respiratory, gastrointestinal, genitourinary, autonomic, and behaviour at interview. Sum 0-56. magent does not interview the patient. No total-score severity bands in Hamilton 1959; later 17/24 cutoffs are not applied. Not a diagnosis and not a medical device.

## Output

Returns the HAM-A total score as a sum of the 14 subscale integer inputs (range 0–56), computed strictly per Hamilton 1959. No severity band labels or diagnostic conclusions are applied; the response reflects only the arithmetic sum.

## 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": [
      "anxious_mood",
      "tension",
      "fears",
      "insomnia",
      "intellectual",
      "depressed_mood",
      "somatic_muscular",
      "somatic_sensory",
      "cardiovascular",
      "respiratory",
      "gastrointestinal",
      "genitourinary",
      "autonomic",
      "interview_behavior"
     ],
     "properties": {
      "fears": {
       "type": "integer",
       "description": "Caller-assigned Hamilton 1959 fears (integer 0-4): of dark, of strangers, of being left alone, of animals, of traffic, of crowds. magent does not interview the patient."
      },
      "tension": {
       "type": "integer",
       "description": "Caller-assigned Hamilton 1959 tension (integer 0-4): feelings of tension, fatigability, startle response, moved to tears easily, trembling, restlessness, inability to relax. magent does not interview the patient."
      },
      "insomnia": {
       "type": "integer",
       "description": "Caller-assigned Hamilton 1959 insomnia (integer 0-4): difficulty falling asleep, broken sleep, unsatisfying sleep and fatigue on waking, dreams, nightmares, night terrors. magent does not interview the patient."
      },
      "autonomic": {
       "type": "integer",
       "description": "Caller-assigned Hamilton 1959 autonomic symptoms (integer 0-4): dry mouth, flushing, pallor, tendency to sweat, giddiness, tension headache, raising of hair. magent does not interview the patient."
      },
      "respiratory": {
       "type": "integer",
       "description": "Caller-assigned Hamilton 1959 respiratory symptoms (integer 0-4): pressure or constriction in chest, choking feelings, sighing, dyspnea. magent does not interview the patient."
      },
      "anxious_mood": {
       "type": "integer",
       "description": "Caller-assigned Hamilton 1959 anxious mood (integer 0-4: 0 not present, 1 mild, 2 moderate, 3 severe, 4 very severe): worries, anticipation of the worst, 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/magent-hamilton-anxiety-scale-ham-a-calculator-aa2c6c95/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)
