Skip to main content
Glama
martc03

cybersecurity-vuln-mcp

vuln_kev_latest

Get actively exploited vulnerabilities from CISA KEV added in the last N days. Customize lookback period and result count.

Instructions

Get recently added CISA KEV entries (actively exploited vulnerabilities).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoLook back N days
limitNo

Implementation Reference

  • Primary handler registration for the 'vuln_kev_latest' tool using McpServer.tool(). Calls getLatestKevEntries() helper, formats response with attribution, and includes gateway authentication.
    // ---- Tool 3: Recent KEV Entries ----
    
    mcpServer.tool(
      "vuln_kev_latest",
      "Get recently added entries from the CISA Known Exploited Vulnerabilities (KEV) catalog. These are vulnerabilities confirmed to be actively exploited in the wild and require immediate remediation for federal agencies.",
      {
        days: z.number().int().min(1).max(365).default(7).describe("Look back N days (default 7)"),
        limit: z.number().int().min(1).max(100).default(20),
        _gatewayToken: z.string().optional().describe("Internal gateway token"),
      },
      async ({ days, limit, _gatewayToken }) => {
        if (!_gatewayToken || _gatewayToken !== GATEWAY_SECRET) {
          await Actor.charge({ eventName: "tool-request" });
        }
    
        try {
          const entries = await getLatestKevEntries(days, limit);
    
          const response = {
            period: `Last ${days} days`,
            count: entries.length,
            entries: entries.map((e) => ({
              cveId: e.cveID,
              vendor: e.vendorProject,
              product: e.product,
              name: e.vulnerabilityName,
              dateAdded: e.dateAdded,
              dueDate: e.dueDate,
              requiredAction: e.requiredAction,
              ransomwareUse: e.knownRansomwareCampaignUse,
              description: e.shortDescription,
            })),
            attribution: { kev: ATTRIBUTION.kev },
          };
    
          return {
            content: [{ type: "text" as const, text: JSON.stringify(response, null, 2) }],
            structuredContent: response,
            isError: false,
          };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return {
            content: [{ type: "text" as const, text: `Error fetching KEV entries: ${msg}` }],
            isError: true,
          };
        }
      },
  • Alternative stdio-based handler registration for 'vuln_kev_latest' tool. Similar logic but without gateway token/charging, used for stdio transport mode.
    mcpServer.tool(
      "vuln_kev_latest",
      "Get recently added CISA KEV entries (actively exploited vulnerabilities).",
      {
        days: z.number().int().min(1).max(365).default(7).describe("Look back N days"),
        limit: z.number().int().min(1).max(100).default(20),
      },
      async ({ days, limit }) => {
        try {
          const entries = await getLatestKevEntries(days, limit);
          const response = {
            period: `Last ${days} days`,
            count: entries.length,
            entries: entries.map((e) => ({
              cveId: e.cveID, vendor: e.vendorProject, product: e.product,
              name: e.vulnerabilityName, dateAdded: e.dateAdded, dueDate: e.dueDate,
              requiredAction: e.requiredAction, ransomwareUse: e.knownRansomwareCampaignUse,
              description: e.shortDescription,
            })),
            attribution: { kev: ATTRIBUTION.kev },
          };
          return { content: [{ type: "text" as const, text: JSON.stringify(response, null, 2) }], isError: false };
        } catch (error) {
          const msg = error instanceof Error ? error.message : String(error);
          return { content: [{ type: "text" as const, text: `Error fetching KEV entries: ${msg}` }], isError: true };
        }
      },
  • Core helper function getLatestKevEntries() that loads the CISA KEV JSON catalog, filters entries added within the given number of days, sorts by date descending, and returns up to 'limit' entries.
    export async function getLatestKevEntries(
      days: number,
      limit: number,
    ): Promise<KevEntry[]> {
      const catalog = await loadCatalog();
      const cutoff = new Date();
      cutoff.setDate(cutoff.getDate() - days);
      const cutoffStr = cutoff.toISOString().slice(0, 10);
    
      return catalog.vulnerabilities
        .filter((v) => v.dateAdded >= cutoffStr)
        .sort((a, b) => b.dateAdded.localeCompare(a.dateAdded))
        .slice(0, limit);
    }
  • Zod schema definitions for the tool: days (1-365, default 7), limit (1-100, default 20), and optional _gatewayToken.
    {
      days: z.number().int().min(1).max(365).default(7).describe("Look back N days (default 7)"),
      limit: z.number().int().min(1).max(100).default(20),
      _gatewayToken: z.string().optional().describe("Internal gateway token"),
    },
  • Gateway Express route that forwards GET /kev/latest requests to the MCP tool 'vuln_kev_latest' with optional 'days' and 'limit' query parameters.
    // GET /api/v1/cyber/kev/latest
    router.get("/kev/latest", async (req: Request, res: Response) => {
        const start = Date.now();
        const tool = "vuln_kev_latest";
        try {
            const data = await callMcpTool({
                serverName: SERVER,
                toolName: tool,
                args: {
                    ...(req.query.days && { days: Number(req.query.days) }),
                    ...(req.query.limit && { limit: Number(req.query.limit) }),
                },
            });
            res.json(successResponse(data, tool, Date.now() - start, SERVER));
        } catch (error) {
            const msg = error instanceof Error ? error.message : String(error);
            res.status(502).json(errorResponse(msg, tool, Date.now() - start, SERVER));
        }
    });
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It correctly indicates a read operation returning vulnerability entries, but lacks details on output format, pagination, or rate limits. The description is adequate but not comprehensive.

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

Conciseness5/5

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

A single, concise sentence of 7 words contains all essential information without fluff. Every word earns its place.

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

Completeness3/5

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

The tool is simple (2 optional params, no output schema), and the description provides a basic understanding. However, it does not explain the return format or pagination behavior (implied by 'limit'), and lacks annotation context. Given the absence of output schema, more detail would help, but the description is minimally functional.

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

Parameters2/5

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

Schema coverage is 50% (only 'days' has a description). The tool description does not add any parameter details beyond the schema's 'Look back N days' for 'days' and leaves 'limit' with no semantic explanation. No extra meaning is provided to compensate for the coverage gap.

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 clearly states 'Get recently added CISA KEV entries', specifying the verb (Get), resource (CISA KEV entries), and temporal scope (recently added). This distinguishes it from sibling tools like vuln_by_vendor (vendor-specific) or vuln_epss_top (EPSS ranking).

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

Usage Guidelines2/5

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

No explicit guidance on when to use this tool versus alternatives. While the description implies usage for recent KEV entries, it does not mention exclusions or recommend sibling tools for other cases (e.g., vuln_lookup_cve for specific CVEs).

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/martc03/gov-mcp-servers'

If you have feedback or need assistance with the MCP directory API, please join our Discord server