Skip to main content
Glama
davidculver

CVE MCP Server

by davidculver

get_cve_details

Retrieve detailed CVE information including severity, CVSS score, description, and references by providing a CVE identifier.

Instructions

Get detailed information about a specific CVE by its ID. Returns severity, CVSS score, description, and references.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cve_idYesThe CVE identifier (e.g., 'CVE-2024-0001')

Implementation Reference

  • The core handler function for the 'get_cve_details' tool. Normalizes the CVE ID, retrieves the CVE data from the database using get_cve, parses and cleans up references from JSON, and returns formatted JSON response or error if not found.
    def tool_get_cve_details(cve_id: str) -> str:
        conn = get_connection()
    
        cve_id = cve_id.strip().upper()
        if not cve_id.startswith("CVE-"):
            cve_id = "CVE-{}".format(cve_id)
    
        result = get_cve(conn, cve_id)
    
        if result:
            if result.get('references_json'):
                try:
                    result['references'] = json.loads(result['references_json'])
                except:
                    result['references'] = []
                del result['references_json']
    
            return json.dumps(result, indent=2)
    
        return json.dumps({"error": "not found", "cve_id": cve_id})
  • Tool registration in @app.list_tools(), including name, description, and input schema for 'get_cve_details'.
    Tool(
        name="get_cve_details",
        description="Get detailed information about a specific CVE by its ID. "
                    "Returns severity, CVSS score, description, and references.",
        inputSchema={
            "type": "object",
            "properties": {
                "cve_id": {
                    "type": "string",
                    "description": "The CVE identifier (e.g., 'CVE-2024-0001')"
                }
            },
            "required": ["cve_id"]
        }
    ),
  • Dispatch logic in @app.call_tool() that maps the tool call to the handler function.
    if name == "get_cve_details":
        result = tool_get_cve_details(arguments.get("cve_id", ""))
  • Helper function to lazily initialize and provide database connection used by the tool handler.
    def get_connection():
        global _conn
        if _conn is None:
            _conn = init_db()
        return _conn
  • Import of the tool handler functions into the server module.
    from .tools import (
        tool_get_cve_details,
Behavior2/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 of behavioral disclosure. While it mentions the return data (severity, CVSS score, etc.), it lacks information about error handling, rate limits, authentication requirements, or whether this is a read-only operation. The description adds some value but leaves significant behavioral gaps.

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?

The description is appropriately sized and front-loaded, consisting of two concise sentences that efficiently convey the tool's purpose and return values without any wasted words. Every sentence earns its place by providing essential information.

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?

Given the tool's moderate complexity (single parameter, no output schema), the description is somewhat complete but lacks details on behavioral aspects like error handling or operational constraints. It covers the basic purpose and return data but does not fully compensate for the absence of annotations, leaving room for improvement in context.

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?

The schema description coverage is 100%, with the parameter 'cve_id' fully documented in the schema. The description does not add any additional meaning or syntax details beyond what the schema provides, such as format examples or validation rules, so it meets the baseline for high schema coverage.

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 the tool's purpose with a specific verb ('Get detailed information') and resource ('about a specific CVE by its ID'), and distinguishes it from sibling tools like 'get_statistics' and 'search_cves' by focusing on individual CVE details rather than aggregated statistics or search functionality.

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 implicitly suggests usage when detailed information about a specific CVE is needed, but does not explicitly state when to use this tool versus alternatives like 'search_cves' or provide exclusions. It provides clear context for retrieving details by CVE ID.

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/davidculver/cve-mcp-server'

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