---
name: var_limits
description: Retrieve VaR limits, utilization, and breach status for a business hierarchy node ID. Requires a numeric node_id — if the user provides text instead, use node_resolver first.
---

# VaR Limits

## Purpose
Retrieve **VaR limits**, current **utilization**, and **breach status** for a given
business hierarchy node, enabling limit monitoring and compliance reporting.

## Strict Contract: node_id Only
This skill accepts **only numeric node_id** — never free-text desk names.

If the user provides text (e.g. "Rates Trading"), you MUST first call
`node_resolver` to resolve it to a `node_id`, then call this skill with the result.

**Fail closed:** If `node_id` is missing or looks like text, return a
`MISSING_NODE_ID` error — never guess.

## When to Use
- "Is desk **102393** within its risk limits?"
- Checking VaR limit utilization
- Breach reporting and alerting
- Limit monitoring dashboards

## Input Contract
```json
{
  "node_id": "102393",
  "cob": "2026-03-24"
}
```

### Validation Rules
- `node_id`: Required. Must be numeric (digits only). Reject anything else.
- `cob`: Required. Close of business date, YYYY-MM-DD.

## Output Contract
```json
{
  "node_id": "102393",
  "cob": "2026-03-24",
  "limit_99": 5000000,
  "limit_01": 4500000,
  "current_var": 3200000,
  "utilization": 0.64,
  "breach": false
}
```

## Error Responses
```json
{
  "status": "MISSING_NODE_ID",
  "message": "node_id is required and must be numeric. Use node_resolver to resolve text to a node_id first.",
  "hint": "Call node_resolver('Rates Trading') to get the node_id."
}
```

## Notes
- `utilization` = current_var / limit_99 (ratio, 0.0–1.0+)
- `breach` = true when utilization > 1.0
- Calls REST API with authentication
