Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_get_package_version_vulnerabilities

Identify vulnerabilities in specific versions of open source packages across multiple ecosystems. Input package type, name, and version to retrieve detailed security insights.

Instructions

Useful for when you need the list of known vulnerabilities affecting a specific version of an open source package.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the package, as it appears in the package repository.
pageCountNoNumber of pages to return.
pageSizeNoNumber of vulnerabilities to return per page.
typeYesThe type of package.
versionNoThe version of the package, as it appears in the package repository. Default value is 'latest'.latest

Implementation Reference

  • The core handler function that performs a GraphQL query to the JFrog Catalog API to retrieve vulnerabilities for a specific package version, processes and validates the response, and returns the list of vulnerabilities.
    export async function getPackageVersionVulnerabilities(options: JFrogCatalogPackageVersionVulnerabilitiesSchema) {
      const query = `query GetCatalogPackageVersionVulnerabilities(
            $type: String!, 
            $name: String!, 
            $version: String!,
            $first: Int!,
            $orderBy: VulnerabilityOrder!
        ) {
            packageVersion(type: $type, name: $name, version: $version) {
                vulnerabilities(
                    first: $first,
                    orderBy: $orderBy
                ) {
                    edges {
                        node {
                            name
                            description
                            severity
                        }
                    }
                }
            }
        }`;
    
      const variables = {
        type: options.type,
        name: options.name,
        version: options.version,
        first: options.pageSize,
        orderBy: {
          field: "SEVERITY_VALUE",
          direction: "DESC"
        }
      };
    
      function processResponse(response: unknown) {
        const validatedResponse = z.object({
          data: z.object({
            packageVersion: z.object({
              vulnerabilities: z.object({
                edges: z.array(z.object({
                  node: JFrogCatalogVulnerabilityResponseSchema
                }))
              })
            }).nullable()
          })
        }).parse(response);
    
        if (!validatedResponse.data.packageVersion) {
          return [];
        }
    
        return validatedResponse.data.packageVersion.vulnerabilities.edges.map(edge => edge.node);
      }
    
      const processedData = await jfrogRequest(
        "xray/catalog/graphql",
        {
          method: "POST",
          body: JSON.stringify({ query, variables })
        },
        processResponse
      );
    
      return JFrogCatalogVulnerabilityResponseSchema.array().parse(processedData);
    }
  • Zod schema defining the input parameters for the tool: package type, name, version, pageSize, and pageCount.
    export const JFrogCatalogPackageVersionVulnerabilitiesSchema = JFrogCatalogPackageVersionSchema.extend({
      pageSize: z.number().default(10).describe("Number of vulnerabilities to return per page."),
      pageCount: z.number().default(1).describe("Number of pages to return.")
    });
  • The tool registration object that defines the tool's name, description, input schema, and a thin handler wrapper delegating to the main handler function.
    const getCatalogPackageVersionVulnerabilitiesTool = {
      name: "jfrog_get_package_version_vulnerabilities",
      description: "Useful for when you need the list of known vulnerabilities affecting a specific version of an open source package.",
      inputSchema: zodToJsonSchema(JFrogCatalogPackageVersionVulnerabilitiesSchema),
      //outputSchema: zodToJsonSchema(JFrogCatalogVulnerabilityResponseSchema),
      handler: async (args: any) => {
        const parsedArgs = JFrogCatalogPackageVersionVulnerabilitiesSchema.parse(args);
        return await getPackageVersionVulnerabilities(parsedArgs);
      }
    };
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. It mentions retrieving a 'list of known vulnerabilities,' which implies a read-only operation, but doesn't cover critical aspects like authentication requirements, rate limits, error conditions, or pagination behavior (despite pagination parameters in the schema). This leaves significant gaps in understanding how the tool behaves in practice.

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?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It's appropriately front-loaded with the core functionality. However, it could be slightly more structured by explicitly mentioning key parameters or constraints, which would improve clarity without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of vulnerability data retrieval and the lack of annotations and output schema, the description is insufficient. It doesn't explain what the output looks like (e.g., format, fields), how pagination works with 'pageCount' and 'pageSize', or any dependencies or prerequisites. This leaves the agent poorly equipped to use the tool effectively in real scenarios.

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 description adds no parameter-specific information beyond what's already in the schema, which has 100% coverage with clear descriptions for all parameters. This meets the baseline of 3, as the schema adequately documents the parameters, but the description doesn't enhance understanding with additional context or examples.

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: 'get the list of known vulnerabilities affecting a specific version of an open source package.' It specifies the verb ('get'), resource ('vulnerabilities'), and scope ('specific version of an open source package'), making it easy to understand. However, it doesn't explicitly differentiate from sibling tools like 'jfrog_get_vulnerability_info' or 'jfrog_get_package_info', 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 minimal guidance with 'Useful for when you need...', which implies context but doesn't specify when to use this tool versus alternatives. No explicit when-not-to-use scenarios or references to sibling tools are included, leaving the agent with little direction on tool selection in this crowded namespace.

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

Related 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/jfrog/mcp-jfrog'

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