Skip to main content
Glama

Weakness

weakness
Read-onlyIdempotent

"What is CWE-[N]" / "look up CWE [name]" / "details on [weakness]" / "explain XSS / SQL injection / buffer overflow" / "what kind of security flaw is [X]" — fetch a single MITRE CWE (Common Weakness Enumeration) record with description, examples, mitigations, related attacks, references. Use for security analysis, vulnerability triage, threat-modeling, secure-coding training. Example IDs: 79 (XSS), 89 (SQL injection), 787 (out-of-bounds write).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesCWE id (e.g. "79" or "CWE-79")
viewNoOptional view id to retrieve view-specific info.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
WeaknessesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changed
    • addedOutput schema / properties / Weaknesses
      Added value: +{
      +  "items": {
      +    "properties": {
      +      "Abstraction": {
      +        "type": "string"
      +      },
      +      "AlternateTerms": {
      +        "items": {
      +          "properties": {
      +            "Description": {
      +              "type": "string"
      +            },
      +            "Term": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "ApplicablePlatforms": {
      +        "items": {
      +          "properties": {
      +            "Class": {
      +              "type": "string"
      +            },
      +            "Name": {
      +              "type": "string"
      +            },
      +            "Prevalence": {
      +              "type": "string"
      +            },
      +            "Type": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "BackgroundDetails": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "CommonConsequences": {
      +        "items": {
      +          "properties": {
      +            "Impact": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "Note": {
      +              "type": "string"
      +            },
      +            "Scope": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "ContentHistory": {
      +        "items": {
      +          "properties": {
      +            "ModificationComment": {
      +              "type": "string"
      +            },
      +            "ModificationDate": {
      +              "type": "string"
      +            },
      +            "ModificationName": {
      +              "type": "string"
      +            },
      +            "ModificationOrganization": {
      +              "type": "string"
      +            },
      +            "ModificationReleaseDate": {
      +              "type": "string"
      +            },
      +            "ModificationVersion": {
      +              "type": "string"
      +            },
      +            "SubmissionDate": {
      +              "type": "string"
      +            },
      +            "SubmissionName": {
      +              "type": "string"
      +            },
      +            "SubmissionReleaseDate": {
      +              "type": "string"
      +            },
      +            "SubmissionVersion": {
      +              "type": "string"
      +            },
      +            "Type": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "DemonstrativeExamples": {
      +        "items": {
      +          "properties": {
      +            "Entries": {
      +              "items": {
      +                "properties": {
      +                  "BodyText": {
      +                    "type": "string"
      +                  },
      +                  "ExampleCode": {
      +                    "type": "string"
      +                  },
      +                  "IntroText": {
      +                    "type": "string"
      +                  },
      +                  "Language": {
      +                    "type": "string"
      +                  },
      +                  "Nature": {
      +                    "type": "string"
      +                  }
      +                },
      +                "type": "object"
      +              },
      +              "type": "array"
      +            },
      +            "ID": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "Description": {
      +        "type": "string"
      +      },
      +      "DetectionMethods": {
      +        "items": {
      +          "properties": {
      +            "Description": {
      +              "type": "string"
      +            },
      +            "DetectionMethodID": {
      +              "type": "string"
      +            },
      +            "Effectiveness": {
      +              "type": "string"
      +            },
      +            "EffectivenessNotes": {
      +              "type": "string"
      +            },
      +            "Method": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "Diagram": {
      +        "type": "string"
      +      },
      +      "ExtendedDescription": {
      +        "type": "string"
      +      },
      +      "ID": {
      +        "type": "string"
      +      },
      +      "LikelihoodOfExploit": {
      +        "type": "string"
      +      },
      +      "MappingNotes": {
      +        "properties": {
      +          "Comments": {
      +            "type": "string"
      +          },
      +          "Rationale": {
      +            "type": "string"
      +          },
      +          "Reasons": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "Usage": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "ModesOfIntroduction": {
      +        "items": {
      +          "properties": {
      +            "Note": {
      +              "type": "string"
      +            },
      +            "Phase": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "Name": {
      +        "type": "string"
      +      },
      +      "Notes": {
      +        "items": {
      +          "properties": {
      +            "Note": {
      +              "type": "string"
      +            },
      +            "Type": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "ObservedExamples": {
      +        "items": {
      +          "properties": {
      +            "Description": {
      +              "type": "string"
      +            },
      +            "Link": {
      +              "type": "string"
      +            },
      +            "Reference": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "PotentialMitigations": {
      +        "items": {
      +          "properties": {
      +            "Description": {
      +              "type": "string"
      +            },
      +            "Effectiveness": {
      +              "type": "string"
      +            },
      +            "EffectivenessNotes": {
      +              "type": "string"
      +            },
      +            "MitigationID": {
      +              "type": "string"
      +            },
      +            "Phase": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "Strategy": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "References": {
      +        "items": {
      +          "properties": {
      +            "Authors": {
      +              "items": {
      +                "type": "string"
      +              },
      +              "type": "array"
      +            },
      +            "Edition": {
      +              "type": "string"
      +            },
      +            "ExternalReferenceID": {
      +              "type": "string"
      +            },
      +            "Publication": {
      +              "type": "string"
      +            },
      +            "PublicationDay": {
      +              "type": "string"
      +            },
      +            "PublicationMonth": {
      +              "type": "string"
      +            },
      +            "PublicationYear": {
      +              "type": "string"
      +            },
      +            "Publisher": {
      +              "type": "string"
      +            },
      +            "Section": {
      +              "type": "string"
      +            },
      +            "Title": {
      +              "type": "string"
      +            },
      +            "URL": {
      +              "type": "string"
      +            },
      +            "URLDate": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "RelatedAttackPatterns": {
      +        "items": {
      +          "type": "string"
      +        },
      +        "type": "array"
      +      },
      +      "RelatedWeaknesses": {
      +        "items": {
      +          "properties": {
      +            "CweID": {
      +              "type": "string"
      +            },
      +            "Nature": {
      +              "type": "string"
      +            },
      +            "Ordinal": {
      +              "type": "string"
      +            },
      +            "ViewID": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "Status": {
      +        "type": "string"
      +      },
      +      "Structure": {
      +        "type": "string"
      +      },
      +      "TaxonomyMappings": {
      +        "items": {
      +          "properties": {
      +            "EntryID": {
      +              "type": "string"
      +            },
      +            "EntryName": {
      +              "type": "string"
      +            },
      +            "MappingFit": {
      +              "type": "string"
      +            },
      +            "TaxonomyName": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "WeaknessOrdinalities": {
      +        "items": {
      +          "properties": {
      +            "Ordinality": {
      +              "type": "string"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "type": "array"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • removedOutput schema / properties / cwe_id
      Removed value: -{
      -  "description": "CWE identifier",
      -  "type": "string"
      -}
    • removedOutput schema / properties / description
      Removed value: -{
      -  "description": "Detailed description of the weakness",
      -  "type": "string"
      -}
    • removedOutput schema / properties / memberships
      Removed value: -{
      -  "description": "Category memberships",
      -  "type": "array"
      -}
    • removedOutput schema / properties / name
      Removed value: -{
      -  "description": "Weakness name",
      -  "type": "string"
      -}
    • removedOutput schema / properties / status
      Removed value: -{
      -  "description": "Status of the CWE record",
      -  "type": "string"
      -}
    • removedOutput schema / properties / weaknessabs
      Removed value: -{
      -  "description": "Abstract weaknesses",
      -  "type": "array"
      -}
  2. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "id": "79"
      +  },
      +  {
      +    "id": "CWE-89",
      +    "view": "1003"
      +  }
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "description": "CWE weakness record from MITRE CWE API",
      +  "properties": {
      +    "cwe_id": {
      +      "description": "CWE identifier",
      +      "type": "string"
      +    },
      +    "description": {
      +      "description": "Detailed description of the weakness",
      +      "type": "string"
      +    },
      +    "memberships": {
      +      "description": "Category memberships",
      +      "type": "array"
      +    },
      +    "name": {
      +      "description": "Weakness name",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "Status of the CWE record",
      +      "type": "string"
      +    },
      +    "weaknessabs": {
      +      "description": "Abstract weaknesses",
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive behavior, so the safety profile is covered. The description adds value by disclosing the content returned (description, examples, mitigations, related attacks, references), which is useful context. No contradictions with annotations.

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

Conciseness4/5

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

The description is informative with examples and use cases, but it is somewhat lengthy. It is front-loaded with query patterns and includes example IDs, making it actionable. No wasted sentences; all information serves a purpose. Slightly verbose but effective.

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?

The tool has an output schema, so return values are defined. The description covers purpose, usage context, and example queries. For a read-only single-record lookup with clear parameters, nothing essential is missing. Complete for an agent to call it correctly.

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

Parameters3/5

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

Schema description coverage is 100% for both parameters (id and view), so the schema already explains their meaning. The description provides example IDs and formats (e.g., '79' or 'CWE-79'), which slightly enriches understanding, but this is marginal and not essential beyond the schema. Baseline 3 is appropriate.

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

Purpose5/5

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

The description explicitly states the tool fetches a single MITRE CWE record with description, examples, mitigations, related attacks, and references. It uses specific verbs (fetch, look up) and resource (CWE record), and provides example queries and IDs, making it clearly distinct from all sibling tools which are unrelated.

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?

The description specifies when to use the tool: 'for security analysis, vulnerability triage, threat-modeling, secure-coding training.' It also provides example query patterns. It does not explicitly list when not to use it or name alternatives, but since no sibling tool covers CWE lookups, the guidance is sufficient and unambiguous.

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.