Skip to main content
Glama

lookup_ave

Retrieve a complete AVE record for a vulnerability ID, including CVSS-AI score, indicators of compromise, and remediation steps.

Instructions

Get the full AVE record for a specific vulnerability ID.

Returns the complete record including title, description, CVSS-AI score, behavioral fingerprint, indicators of compromise, OWASP MCP mapping, NIST AI RMF mapping, and remediation steps.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ave_idYesAVE ID in the format AVE-2026-NNNNN (e.g. AVE-2026-00001)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The tool handler function decorated with @mcp.tool(). Validates AVE ID format, calls _piranha_get to fetch the record from the PiranhaDB API, then formats the response into a human-readable string with title, severity, attack class, description, behavioral fingerprint, OWASP mappings, remediation, and indicators of compromise.
    @mcp.tool()
    def lookup_ave(ave_id: str) -> str:
        """
        Get the full AVE record for a specific vulnerability ID.
    
        Returns the complete record including title, description,
        CVSS-AI score, behavioral fingerprint, indicators of compromise,
        OWASP MCP mapping, NIST AI RMF mapping, and remediation steps.
    
        Args:
            ave_id: AVE ID in the format AVE-2026-NNNNN (e.g. AVE-2026-00001)
        """
        ave_id = ave_id.strip().upper()
        if not ave_id.startswith("AVE-"):
            return "Error: AVE ID must be in the format AVE-2026-NNNNN"
    
        data = _piranha_get(f"/records/{ave_id}")
    
        if data.get("error"):
            return f"Error: {data['error']}"
    
        lines = [
            f"{data.get('ave_id', '')}  {data.get('title', '')}",
            f"Severity:     {data.get('severity', '')}  (CVSS-AI {data.get('cvss_ai_score', '')})",
            f"Attack class: {data.get('attack_class', '')}",
            f"Component:    {data.get('component_type', '')}",
            f"Status:       {data.get('status', '')}",
            "",
            f"Description:",
            f"  {data.get('description', '')}",
            "",
            f"Behavioral fingerprint:",
            f"  {data.get('behavioral_fingerprint', '')}",
            "",
        ]
    
        owasp = data.get("owasp_mapping", [])
        owasp_mcp = data.get("owasp_mcp", [])
        if owasp:
            lines.append(f"OWASP ASI:  {', '.join(owasp)}")
        if owasp_mcp:
            lines.append(f"OWASP MCP:  {', '.join(owasp_mcp)}")
    
        remediation = data.get("remediation", "")
        if remediation:
            lines.append("")
            lines.append("Remediation:")
            lines.append(f"  {remediation}")
    
        iocs = data.get("indicators_of_compromise", [])
        if iocs:
            lines.append("")
            lines.append("Indicators of compromise:")
            for ioc in iocs:
                lines.append(f"  - {ioc}")
    
        lines.append("")
        lines.append(f"Full record: {PIRANHA_API}/records/{ave_id}")
    
        return "\n".join(lines)
  • Input schema: takes a single string parameter 'ave_id' in format AVE-2026-NNNNN. Returns a formatted string.
    def lookup_ave(ave_id: str) -> str:
        """
        Get the full AVE record for a specific vulnerability ID.
    
        Returns the complete record including title, description,
        CVSS-AI score, behavioral fingerprint, indicators of compromise,
        OWASP MCP mapping, NIST AI RMF mapping, and remediation steps.
    
        Args:
            ave_id: AVE ID in the format AVE-2026-NNNNN (e.g. AVE-2026-00001)
        """
  • Registration via the @mcp.tool() decorator from FastMCP, registering lookup_ave as an MCP tool.
    @mcp.tool()
  • Helper function that makes HTTP GET requests to the PiranhaDB API (https://api.piranha.bawbel.io) and returns parsed JSON. Used by lookup_ave to fetch the AVE record.
    def _piranha_get(path: str) -> dict:
        """GET from PiranhaDB API. Returns parsed JSON or error dict."""
        url = f"{PIRANHA_API}{path}"
        content, err = _fetch_url(url)
        if err:
            return {"error": f"PiranhaDB unavailable: {err}"}
        try:
            return json.loads(content)
        except json.JSONDecodeError:
            return {"error": "Invalid response from PiranhaDB"}
  • Low-level URL fetching helper using urllib. Used by _piranha_get to make the actual HTTP request.
    def _fetch_url(url: str) -> tuple[Optional[str], Optional[str]]:
        """Fetch content from a URL. Returns (content, error)."""
        try:
            req = urllib.request.Request(
                url,
                headers={"User-Agent": "bawbel-mcp/1.0 (https://bawbel.io)"},
            )
            with urllib.request.urlopen(req, timeout=10) as r:  # nosec B310  # noqa: S310
                return r.read(MAX_CONTENT_BYTES).decode("utf-8", errors="replace"), None
        except urllib.error.HTTPError as e:
            return None, f"HTTP {e.code}: {e.reason}"
        except urllib.error.URLError as e:
            return None, f"URL error: {e.reason}"
        except Exception as e:  # noqa: BLE001
            return None, str(e)
Behavior3/5

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

No annotations provided, so description carries full burden. It enumerates return fields (title, description, scores, mappings), but does not disclose side effects, rate limits, or auth requirements. The read-only nature is implicit but not stated.

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?

Two sentences, first front-loading the core purpose, second listing return fields. No extraneous words, but could integrate the field list into a single sentence.

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?

Operation is simple (single param, single lookup). Output schema exists, so return values are documented elsewhere. Description covers the essential fields returned. Minor gap: no mention of behavior if AVE ID not found.

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% with a detailed format description including example. The description adds no new parameter information beyond what the schema already provides.

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 uses a specific verb 'Get' and resource 'full AVE record' for a specific vulnerability ID, clearly distinguishing it from siblings like list_ave (multiple) and search_ave (search).

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

Usage Guidelines3/5

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

Implies use when you have a specific vulnerability ID, but does not explicitly contrast with alternatives (e.g., list_ave for browsing, search_ave for filtering). No when-not-to-use guidance.

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/bawbel/bawbel-mcp'

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