CWE

list_top_cwes

Returns the most-referenced CWEs across all scored CVEs, ranked by how often each weakness appears across the CVE dataset. Useful for identifying systemic vulnerability patterns in a portfolio. Costs 1 credit.

POST
tools/call

Cost: 1 credit per successful call  ·  Response shape: jsonb

Parameters

limitintegeroptionaldefault: 25

Maximum number of CWEs to return. Accepts 1–50.

Example invocation

Ask your agent: "What are the top 10 most common CWEs across all scored CVEs?"

curl -s https://mcp.precursorintelligence.com \
  -H "Authorization: Bearer $PRECURSOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_top_cwes","arguments":{"limit":10}}}'

Response

result.content[0].text (parsed)
{
  "count": 10,
  "limit": 10,
  "items": [
    {
      "cwe_text": "CWE-79",
      "cwe_id": 79,
      "name": "Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')",
      "cve_count": 4521,
      "likelihood_of_exploit": "High"
    },
    {
      "cwe_text": "CWE-89",
      "cwe_id": 89,
      "name": "Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')",
      "cve_count": 1843,
      "likelihood_of_exploit": "High"
    },
    {
      "cwe_text": "CWE-125",
      "cwe_id": 125,
      "name": "Out-of-bounds Read",
      "cve_count": 1710,
      "likelihood_of_exploit": "Medium"
    },
    {
      "cwe_text": "CWE-787",
      "cwe_id": 787,
      "name": "Out-of-bounds Write",
      "cve_count": 1598,
      "likelihood_of_exploit": "Medium"
    },
    {
      "cwe_text": "CWE-20",
      "cwe_id": 20,
      "name": "Improper Input Validation",
      "cve_count": 1402,
      "likelihood_of_exploit": "Medium"
    }
  ],
  "generated_at": "2026-05-29T10:15:00.000Z"
}

The full MCP envelope (including _meta.precursor with request_id, credits, and generated_at) is documented in Response Format.

Errors

CodeMessageWhen
-32602invalid_params: limit: min:1limit is less than 1
-32602invalid_params: limit: max:50limit is greater than 50
-32001unauthorizedInvalid or revoked API key
-32002insufficient_creditsCredit balance is zero