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

# API Reference — Security Vendor Management

## Agent Tools

| Tool | Description |
|---|---|
| Vendor Tiering | `tier_vendor(data_access, criticality, alternatives)` — Risk classification |
| RFP Scorer | `score_rfp(responses, weights)` — Weighted proposal scoring |
| SLA Checker | `check_sla(metrics, thresholds)` — Compliance verification |

## CLI Usage

```bash
# Tier vendor
node agent.js tier --data-access sensitive --criticality critical --alternatives 1

# Score RFP
node agent.js score --responses '{"vendorA": {"security": 9}}' --weights '{"security": 2}'

# Check SLA
node agent.js sla --metrics '{"uptime": 99.5}' --thresholds '{"uptime": 99.9}'
```

## 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
