<!-- Copyright (c) 2026 defconxt. All rights reserved. -->
<!-- Licensed under AGPL-3.0 — see LICENSE file for details. -->

# API Reference — Security Board Reporting

## Agent Tools

| Tool | Description |
|---|---|
| Executive Summary | `generate_executive_summary(risk, incidents, trend)` — Board-ready summary |
| Risk Quantifier | `quantify_risk(threat, probability, impact)` — FAIR-based financial risk |
| Report Builder | `build_report(metrics, risks, ask)` — Structured board package |

## CLI Usage

```bash
# Generate summary
node agent.js summary --risk medium --incidents 12 --trend improving

# Quantify risk
node agent.js quantify --threat ransomware --probability 0.15 --impact 5000000

# Build report
node agent.js report --metrics '{"mttd": 18}' --risks '[{"name": "ransomware"}]' --ask "Approve EDR"
```

## Output Format

All commands return JSON with the following structure:

```json
{
  "action": "<command_name>",
  "...": "command-specific fields"
}
```

## Error Handling

- Invalid input returns `{"error": "description"}` with non-zero exit code
- JSON parsing errors are caught and reported with context
- Missing required arguments trigger argparse help display
