get_cve
Retrieve detailed information on a specific CVE ID from cve-search.org to assess security vulnerabilities and enhance threat analysis.
Instructions
Get details for a specific CVE ID. Source: cve-search.org
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cveId | Yes | CVE ID to retrieve information for |
Implementation Reference
- src/operations/cves.ts:45-51 (handler)The core handler function that fetches and returns CVE details from the cve-search.org API using the provided CVE ID.export async function getCve(cveId: string): Promise<any> { const response = await fetch(`${BASE_URL}/cve/${encodeURIComponent(cveId)}`); if (!response.ok) { throw new Error(`Failed to get CVE ${cveId}: ${response.statusText}`); } return response.json(); }
- src/operations/cves.ts:7-9 (schema)Zod schema defining the input for the get_cve tool, requiring a cveId string.export const getCveSchema = z.object({ cveId: z.string().describe("CVE ID to retrieve information for"), });
- src/index.ts:314-317 (registration)Tool registration in the list of tools returned by ListToolsRequest, including name, description, and input schema.name: "get_cve", description: "Get details for a specific CVE ID. Source: cve-search.org", inputSchema: zodToJsonSchema(cves.getCveSchema), },
- src/index.ts:723-729 (registration)Dispatcher case in the CallToolRequest handler that parses arguments, calls the getCve function, and formats the response.case "get_cve": { const args = cves.getCveSchema.parse(request.params.arguments); const response = await cves.getCve(args.cveId); return { content: [{ type: "text", text: JSON.stringify(response, null, 2) }], }; }