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).

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "79"
    },
    "name": "weakness"
  }
}

Input Schema

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

Output 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

A3.6/5.0
Behavior3/5

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

The annotations already declare readOnly, idempotent, non-destructive and open-world behavior, so the safety profile is covered. The description adds that each call returns exactly one record and that the payload includes examples, mitigations, related attacks and references, which helps set expectations but partly duplicates the output schema. It says nothing about resolution behavior for name lookups, rate limits or failures.

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 query-phrase list is front-loaded and the use-case summary plus example IDs follow in a compact block with little padding. It is one dense sentence rather than structured prose, but nearly every clause maps to a real selection signal.

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

Completeness4/5

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

For a two-parameter, read-only lookup with an existing output schema and full annotation coverage, the description is close to sufficient: scope, triggers, content and example IDs are all present. The remaining gap is the undocumented `view` parameter and any statement of how name-style inputs are resolved.

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 coverage is 100%, so the baseline is 3, and both parameters are documented there. The description contributes example IDs (79, 89, 787) that make the id format concrete, but it never mentions the optional `view` parameter, and its "look up CWE [name]" phrasing hints at name-based lookup that the schema's id field does not obviously support.

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?

The description states a specific verb and resource: it fetches a single MITRE CWE (Common Weakness Enumeration) record and enumerates what that record contains. The emphasis on "a single" record implicitly contrasts with list-style siblings such as mitre_cwe_children and mitre_cwe_category, but no sibling is named, so differentiation is inferred rather than explicit.

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?

It supplies a rich set of triggering phrasings ("What is CWE-[N]", "look up CWE [name]", "explain XSS / SQL injection") plus four named use cases: security analysis, vulnerability triage, threat-modeling and secure-coding training. That makes the when-to-use case clear, but there are no exclusions or pointers to alternatives for related tasks like browsing CWE hierarchy.

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.