Retrieve CWE weaknesses
cwe_get_weaknessRetrieve CWE weaknesses or categories by ID, such as CWE-79, CWE79, or 79. Processes up to 20 distinct IDs within a 24,000-byte response budget and discloses deferred IDs; a view, a CAPEC ID, or an item that is no ID returns in notFound with recovery guidance; only an item holding a control character other than whitespace, or a non-ID item over 150 characters, rejects the whole call. Defaults to summary, consequences, mitigations, and relations; a default section that does not fit the budget is omitted whole and named with its size and a re-call (kind partial). Summary carries recorded alternate terms such as XSS, ordinalities (Primary, Resultant, Indirect), and background details; the notes section, outside the defaults, returns every note MITRE records, such as Relationship, Maintenance, Terminology, and Research Gap notes. Explicit sections remain complete, including one oversized record with disclosure; an empty sections array requests an outline. exampleLanguage, exampleOffset, and exampleLimit select a complete source-ordered page of section examples: with sections omitted, setting any of them to a non-default value adds examples after the defaults, filled last and outlined with its page size and a re-call when it does not fit; explicit sections without examples ignore them, and guidance gives the re-call that adds examples. Categories are organizational entries, not vulnerability root causes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ids | Yes | One to 200 submitted IDs; up to 20 distinct items are processed within the response budget. | |
| sections | No | Selected sections; omit for defaults, or pass an empty array for an outline. | |
| exampleLimit | No | Complete examples per entry in section examples; no upper bound beyond the finite source array. With sections omitted, a value other than 3 adds examples to the defaults. | |
| exampleOffset | No | Offset in each entry’s language-filtered examples (section examples). With sections omitted, a value above 0 adds examples to the defaults. | |
| exampleLanguage | No | Exact source example code language for section examples; discover values through cwe_list_reference topic platforms. With sections omitted, adds examples to the defaults. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cap | No | Maximum identifiers processed per call. | |
| error | No | Present when the call failed. Absent on success. | |
| shown | No | Identifiers processed. | |
| notice | No | Whole-identifier continuation and budget disclosure. | |
| entries | No | Found projected entries in request order. | |
| guidance | No | Call-level guidance: deferred-ID continuation, budget disclosure, and the re-call for parameters the selected sections leave unused. | |
| notFound | No | Per-ID misses; an all-missing batch is success. | |
| truncated | No | Whether the count or response budget deferred identifiers. | |
| provenance | No | Loaded catalog provenance. | |
| totalCount | No | Distinct submitted identifiers before the batch cap. | |
| deferredIds | No | Distinct items to submit in a later call: canonical IDs, or the collapsed text of an item that is no ID. |