Skip to main content
Glama
ZeroPathAI

ZeroPath MCP Server

Official
by ZeroPathAI

get_sca_vulnerability

Retrieve detailed information about a specific software composition analysis vulnerability by its ID to assess security risks and plan remediation.

Instructions

Get detailed information about a specific SCA vulnerability. Args: vulnerability_id: The ID of the vulnerability to retrieve

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
vulnerability_idYes

Implementation Reference

  • The handler function implementing the get_sca_vulnerability tool. It is registered via the @mcp.tool() decorator. Takes a vulnerability_id, calls the ZeroPath SCA API endpoint, and formats the detailed vulnerability information including package, severity, description, and references.
    @mcp.tool() def get_sca_vulnerability(vulnerability_id: str) -> str: """ Get detailed information about a specific SCA vulnerability. Args: vulnerability_id: The ID of the vulnerability to retrieve """ if not vulnerability_id: return "Error: Vulnerability ID is required" response, error = make_api_request( "sca/vulnerabilities/get", {"id": vulnerability_id} ) if error: return error if response.status_code == 200: vuln = response.json() output = "SCA Vulnerability Details:\n\n" output += f"ID: {vuln.get('id', 'N/A')}\n" output += f"Package: {vuln.get('packageName', 'N/A')}\n" output += f"Version: {vuln.get('version', 'N/A')}\n" output += f"Ecosystem: {vuln.get('ecosystem', 'N/A')}\n" output += f"Severity: {vuln.get('severity', 'N/A')}\n" output += f"CVSS Score: {vuln.get('cvssScore', vuln.get('severityScore', 'N/A'))}\n" # Advisory info if vuln.get('aliases'): output += f"Aliases: {', '.join(vuln['aliases'])}\n" if vuln.get('cve'): output += f"CVE: {vuln['cve']}\n" output += f"\nSummary: {vuln.get('summary', 'N/A')}\n" output += f"\nDescription: {vuln.get('description', 'N/A')}\n" # Fix info if vuln.get('fixedVersion'): output += f"\nFixed in Version: {vuln['fixedVersion']}\n" if vuln.get('references'): output += "\nReferences:\n" for ref in vuln['references'][:5]: # Limit to 5 references output += f" - {ref}\n" return output elif response.status_code == 401: return "Error: Unauthorized - check API credentials" elif response.status_code == 400: return f"Error: Bad request - {response.text}" else: return f"Error: API returned status {response.status_code}: {response.text}"
  • Helper function used by get_sca_vulnerability to make authenticated API requests to the ZeroPath SCA endpoint sca/vulnerabilities/get.
    def make_api_request(endpoint, payload=None, include_org=True): """Make authenticated API request to ZeroPath.""" if not token_id or not token_secret: return None, "Error: Zeropath API credentials not found in environment variables" headers = { "X-ZeroPath-API-Token-Id": token_id, "X-ZeroPath-API-Token-Secret": token_secret, "Content-Type": "application/json" } if payload is None: payload = {} if include_org and org_id: payload["organizationId"] = org_id try: response = requests.post( f"{API_BASE_URL}/{endpoint}", headers=headers, json=payload ) return response, None except Exception as e: return None, f"Error: {str(e)}"
  • The @mcp.tool() decorator registers the get_sca_vulnerability function as an MCP tool.
    @mcp.tool()

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/ZeroPathAI/zeropath-mcp-server'

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