Skip to main content
Glama

query_for_cve_fix_versions

Retrieve fix versions for a specific CVE from the OSV database to identify patched software versions for security vulnerabilities.

Instructions

Query the OSV database for a CVE and return the fix versions.

Args:
    cve: The CVE ID to query

Returns:
    A list of fix versions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cveYes

Implementation Reference

  • MCP tool handler for 'query_for_cve_fix_versions'. Registers the tool and executes by delegating to OSVServer instance method. Includes input schema via type annotation and docstring.
    @mcp.tool()
    def query_for_cve_fix_versions(cve: str):
        """
        Query the OSV database for a CVE and return the fix versions.
    
        Args:
            cve: The CVE ID to query
    
        Returns:
            A list of fix versions
        """
        osv = OSVServer()
        return osv.query_for_cve_fix_versions(cve)
  • Core helper method in OSVServer class implementing the query logic: fetches CVE data from OSV API and extracts fix versions using _parse_fix_versions.
    def query_for_cve_fix_versions(self, cve: str):
        """
        Query the OSV database for a CVE and return the fix versions.
        """
        data = self._query_cve(cve)
        versions = self._parse_fix_versions(data)
        return versions
  • Supporting utility that parses fix version information from the OSV API response JSON.
    def _parse_fix_versions(self, data: dict):
        """
        Parse fix version strings from the OSV response.
        Extracts fix versions from the 'ranges[].events[].fixed' in the affected package data.
        
        Args:
            data: The full OSV response JSON data
            
        Returns:
            List of fixed version strings
        """
        fix_versions = []
        if 'affected' in data:
            for affected in data['affected']:
                if 'ranges' in affected:
                    for range_data in affected['ranges']:
                        if 'events' in range_data:
                            for event in range_data['events']:
                                if 'fixed' in event:
                                    fix_versions.append(event['fixed'])
        return list(set(fix_versions))  # Remove duplicates
  • Helper method to query the OSV API for CVE details.
    def _query_cve(self, cve: str):
        """
        Query the OSV database for a CVE.
        """
        url = self.cve_url.format(cve_id=cve)
        response = requests.get(url)
        return response.json()
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 describes the basic operation (querying and returning fix versions), it doesn't mention important behavioral aspects like error handling, rate limits, authentication requirements, or what happens with invalid CVE inputs. For a tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 extremely concise and well-structured. It uses exactly three sentences: one for the purpose, one for the parameter, and one for the return value. Every sentence earns its place with no wasted words. The information is front-loaded with the core purpose stated first.

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 (querying an external database), no annotations, no output schema, and 0% schema description coverage, the description is minimally adequate. It covers the basic purpose and parameter but lacks important context about error conditions, return format details, or behavioral constraints. The absence of output schema means the description should ideally explain more about the return value structure.

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

Parameters4/5

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

The description explicitly documents the single parameter ('cve: The CVE ID to query'), adding meaningful context beyond the schema. With 0% schema description coverage and only one parameter, the description fully compensates by explaining what the parameter represents. The baseline would be 3 with good schema coverage, but here the description provides complete parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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: 'Query the OSV database for a CVE and return the fix versions.' It specifies the verb ('query'), resource ('OSV database'), and outcome ('return the fix versions'). However, it doesn't explicitly differentiate from sibling tools like 'query_for_cve_affected' or 'query_package_cve', which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'query_for_cve_affected' and 'query_package_cve' available, there's no indication of when this specific query for fix versions is appropriate versus those other queries. The description lacks any 'when-to-use' or 'when-not-to-use' context.

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/EdenYavin/OSV-MCP'

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