Skip to main content
Glama

Retrieve CAPEC attack patterns

cwe_get_attack_pattern
Read-onlyIdempotent

Retrieve CAPEC attack patterns, categories, and views by ID, such as CAPEC-66, CAPEC66, or 66, including Deprecated and Obsolete records; each entry’s type says which. Processes the first 20 distinct positions in submission order and lists later positions in deferredIds; a CWE 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. Patterns default to summary, prerequisites, execution, mitigations, and mappings. Request relations on a pattern for its recorded relationships and direct childAttackPatterns. Categories and views default to summary (the category summary or view objective) and relations (members in source order, or a filter-defined view’s source XPath filterDefinition). Views CAPEC-1000 (Mechanisms of Attack) and CAPEC-3000 (Domains of Attack) are entry points for browsing patterns by category. Request notes for recorded MITRE notes. Selected sections are complete; an empty sections array requests an outline with section sizes. Recorded CWE and ATT&CK mappings are incomplete and do not establish current ATT&CK validation.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "ids": "<ids>"
    },
    "name": "cwe_get_attack_pattern"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYesOne or more IDs. The first 20 distinct positions are processed; later positions are returned in deferredIds.
sectionsNoSelected sections; omit for defaults, or pass an empty array for an outline.

Output Schema

NameRequiredDescriptionDefault
capNoMaximum identifiers processed per call.
errorNoPresent when the call failed. Absent on success.
shownNoIdentifiers processed.
noticeNoHow to continue with deferred IDs.
entriesNoFound projected entries in request order.
guidanceNoCall-level guidance: deferred-ID continuation and the re-call for parameters the selected sections leave unused.
notFoundNoPer-ID misses; an all-missing batch is success.
truncatedNoWhether the 20-position cap deferred identifiers.
provenanceNoLoaded catalog provenance.
totalCountNoDistinct submitted identifiers before the batch cap.
deferredIdsNoDistinct items to submit in a later call: canonical IDs, or the collapsed text of an item that is no ID.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • changedInput schema / properties / ids / description
      Previous value: -"One to 200 submitted IDs; up to 20 distinct items are processed within the response budget."New value: +"One or more IDs. The first 20 distinct positions are processed; later positions are returned in deferredIds."
    • removedInput schema / properties / ids / maxItems
      Removed value: -200
    • addedOutput schema / properties / entries / items / properties / childAttackPatterns
      Added value: +{
      +  "description": "Direct children inferred from recorded ChildOf relations, ordered by numeric CAPEC ID and including every source status.",
      +  "items": {
      +    "additionalProperties": false,
      +    "description": "Direct child attack pattern.",
      +    "properties": {
      +      "abstraction": {
      +        "description": "Source child abstraction.",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Child CAPEC ID.",
      +        "type": "string"
      +      },
      +      "name": {
      +        "description": "Child pattern name.",
      +        "type": "string"
      +      },
      +      "status": {
      +        "description": "Source child status.",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "id",
      +      "name",
      +      "abstraction",
      +      "status"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / properties / entries / items / properties / kind / description
      Previous value: -"full: every selected section the entry has, complete. partial: the sections of a default selection that fit the 24,000-byte response budget, complete, with the omitted ones in outline. outline: identity and section sizes only."New value: +"full: every selected section the entry has, complete. outline: identity and section sizes only."
    • changedOutput schema / properties / entries / items / properties / kind / enum
      Previous value: -[
      -  "full",
      -  "partial",
      -  "outline"
      -]New value: +[
      +  "full",
      +  "outline"
      +]
    • changedOutput schema / properties / entries / items / properties / outline / description
      Previous value: -"Sections available but not included in this entry, with sizes: every available section of an outline, or the selected sections a partial entry omitted."New value: +"All available sections and their sizes, returned for an explicit outline."
    • changedOutput schema / properties / guidance / description
      Previous value: -"Call-level guidance: deferred-ID continuation, budget disclosure, and the re-call for parameters the selected sections leave unused."New value: +"Call-level guidance: deferred-ID continuation and the re-call for parameters the selected sections leave unused."
    • changedOutput schema / properties / notice / description
      Previous value: -"Whole-identifier continuation and budget disclosure."New value: +"How to continue with deferred IDs."
    • changedOutput schema / properties / truncated / description
      Previous value: -"Whether the count or response budget deferred identifiers."New value: +"Whether the 20-position cap deferred identifiers."
  2. Changed8 schema fields changed
    • addedOutput schema / properties / entries / items / properties / alternateTerms / items / properties / roles
      Added value: +{
      +  "description": "Recorded alternate-term roles in source order.",
      +  "items": {
      +    "description": "Recorded alternate-term roles in source order.",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / entries / items / properties / notes / items / properties / releaseDate
      Added value: +{
      +  "description": "Source note release date.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / entries / items / properties / notes / items / properties / version
      Added value: +{
      +  "description": "Source note version.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / entries / items / properties / references / items / properties / accessRestrictions
      Added value: +{
      +  "description": "Source access-restriction label.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / entries / items / properties / references / items / properties / altUrl
      Added value: +{
      +  "description": "Alternative reference URL.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / entries / items / properties / references / items / properties / altUrlDate
      Added value: +{
      +  "description": "Alternative URL access date.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / entries / items / properties / references / items / properties / mediaTypes
      Added value: +{
      +  "description": "Source media-type labels.",
      +  "items": {
      +    "description": "Source media-type labels.",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / entries / items / properties / references / items / properties / rationales
      Added value: +{
      +  "description": "Source reference rationale labels.",
      +  "items": {
      +    "description": "Source reference rationale labels.",
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. First observed

TDQS

A4.2/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnly/openWorld/idempotent, and the description layers on substantial non-obvious behavior: batch truncation at 20 distinct positions with deferredIds, per-item notFound reporting, whole-call rejection only for control characters or non-ID items over 150 characters, and the caveat that recorded CWE/ATT&CK mappings are incomplete and not current validation. That is exactly the kind of edge-case and trust context annotations cannot convey.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the sentences are information-dense, but the block is long and crammed with semicolon-chained clauses. The control-character and 150-character rejection rules are repeated almost verbatim from the input schema, which is wasted space.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, batch-capable retrieval tool with an output schema (so return shape need not be explained), the description covers defaults, partial-failure semantics, rejection triggers, and data-quality caveats. Nothing an agent needs to invoke it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline would be 3, but the description adds semantics the schema lacks: section defaults differ per entry type (patterns get summary/prerequisites/execution/mitigations/mappings; categories and views get summary/relations), and an empty sections array yields an outline with section sizes. Some of the rejection and truncation wording merely restates the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Retrieve CAPEC attack patterns, categories, and views by ID') and gives concrete ID forms (CAPEC-66, CAPEC66, 66). The 'by ID' framing implicitly separates it from the sibling cwe_search_attack_patterns, but no sibling is named, so an agent must infer the lookup-vs-search split.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides real usage context: per-type defaults for patterns, categories, and views, and flags CAPEC-1000/CAPEC-3000 as the entry points for browsing by category. It also explains what happens for CWE IDs (notFound with recovery guidance). It stops short of explicitly stating when to prefer this over cwe_search_attack_patterns.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.