get_controls
Retrieve implementation controls for a threat model, listing required controls or fetching a single control by ID. Read-only; automatically generates controls on first list if none exist.
Instructions
Get implementation controls for a threat model — list or single-control detail. Read-only (with one list-mode side effect, below).
Two modes, selected by whether control_id is set:
List mode (
control_idomitted) — returns the controls that should be implemented to satisfy the model's control objectives, as{"controls": [...], "total": N, "returned": M}. One side effect: if controls have never been generated for this model, the first call triggers generation. Generation may finish inline or continue in the background — if results look incomplete, pollget_control_generation_statusand re-read once it reportscomplete. The filters (status,co_id,component_id), pagination (offset/limit), and theinclude_deleted/include_orphaned/summary_onlytoggles apply only in this mode. By default list mode excludes ORPHANED controls (controls whose every mapped CO is tombstoned because its asset/attacker pair was removed in a later version); passinclude_orphaned=Trueto include them — each returned control carries a booleanorphanedfield so callers can render the distinction.Detail mode (
control_idset) — returns a single control directly (NOT wrapped in an array) with verified-status enrichment and anorphanedflag derived from the live CO set. 404 if the control doesn't exist on the requested version. Passversionto read the control as of a specific model version. The list-mode filters, pagination, and toggles are ignored in this mode.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| co_id | No | List-mode filter — control objective ID. | |
| limit | No | List mode — max controls to return (0 = all). | |
| offset | No | List mode — skip the first N controls (pagination). | |
| status | No | List-mode filter — "implemented", "not_implemented", or "verified". | |
| version | No | Detail mode only — model version to read the control from. 0 (default) uses the latest. Ignored in list mode. | |
| model_id | Yes | ID of the threat model. | |
| control_id | No | If set, detail mode — return this one control's full record directly (e.g. ``CTL-12``). If omitted, list mode. | |
| component_id | No | List-mode filter — component ID (e.g., "CMP1"). | |
| summary_only | No | List mode — if True, returns only id, description, status, assertion_count, and assumed_by per control (much smaller response). | |
| server_version | Yes | ||
| include_deleted | No | List mode — include soft-deleted controls (default False). | |
| include_orphaned | No | List mode — include controls mapped only to tombstoned COs (default False). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||