Skip to main content
Glama
jfrog

JFrog MCP Server

Official
by jfrog

jfrog_get_vulnerability_info

Fetch detailed vulnerability information by CVE ID, including affected packages and versions, using the JFrog MCP Server API for comprehensive security analysis.

Instructions

Useful for when you need to get a specific vulnerability information, including its affected packages and versions.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cve_idYesThe CVE ID or vulnerability identifier to look up.
pageCountNoNumber of pages to return.
pageSizeNoNumber of vulnerabilities to return per page.

Implementation Reference

  • The getVulnerabilityInfo function implements the core tool logic: constructs GraphQL query for vulnerability info, sends request via jfrogRequest helper, validates and processes response into structured output including affected packages.
    export async function getVulnerabilityInfo(options: JFrogCatalogVulnerabilityQuerySchema) {
      const query = `query GetCatalogVulnerabilityInfo(
            $cveId: String!,
            $pageSize: Int!
        ) {
            vulnerability(name: $cveId, ecosystem: "generic") {
                name
                description
                severity
                vulnerablePackages(first: $pageSize) {
                    edges {
                        node {
                            packageVersion {
                                version
                                package {
                                    type
                                    name
                                }
                            }
                        }
                    }
                }
            }
        }`;
    
      const variables = {
        cveId: options.cve_id,
        pageSize: options.pageSize
      };
    
      function processResponse(response: unknown) {
        const validatedResponse = z.object({
          data: z.object({
            vulnerability: z.object({
              name: z.string(),
              description: z.string(),
              severity: z.enum(["Critical", "High", "Medium", "Low", "Unknown"]),
              vulnerablePackages: z.object({
                edges: z.array(z.object({
                  node: z.object({
                    packageVersion: z.object({
                      version: z.string(),
                      package: z.object({
                        type: z.string(),
                        name: z.string()
                      })
                    })
                  })
                }))
              })
            }).nullable()
          })
        }).parse(response);
    
        if (!validatedResponse.data.vulnerability) {
          return null;
        }
    
        const vulnerability = validatedResponse.data.vulnerability;
        return {
          name: vulnerability.name,
          description: vulnerability.description,
          severity: vulnerability.severity,
          vulnerablePackages: vulnerability.vulnerablePackages.edges.map(edge => ({
            type: edge.node.packageVersion.package.type,
            name: edge.node.packageVersion.package.name,
            version: edge.node.packageVersion.version
          }))
        };
      }
    
      const processedData = await jfrogRequest(
        "xray/catalog/graphql",
        {
          method: "POST",
          body: JSON.stringify({ query, variables })
        },
        processResponse
      );
    
      if (!processedData) {
        throw new Error(`Vulnerability information not found for CVE ID: ${options.cve_id}`);
      }
    
      return processedData;
    }
  • Zod input schema for the tool: defines cve_id (required string), pageSize and pageCount (numbers with defaults).
    export const JFrogCatalogVulnerabilityQuerySchema = z.object({
      cve_id: z.string().describe("The CVE ID or vulnerability identifier to look up."),
      pageSize: JFrogCatalogPackageVersionVulnerabilitiesSchema.shape.pageSize,
      pageCount: JFrogCatalogPackageVersionVulnerabilitiesSchema.shape.pageCount
    });
  • Local tool registration: defines the tool object with name, description, inputSchema reference, and thin handler wrapper that validates args and delegates to getVulnerabilityInfo.
    const getCatalogVulnerabilityInfoTool = {
      name: "jfrog_get_vulnerability_info",
      description: "Useful for when you need to get a specific vulnerability information, including its affected packages and versions.",
      inputSchema: zodToJsonSchema(JFrogCatalogVulnerabilityQuerySchema),
      //outputSchema: zodToJsonSchema(JFrogCatalogVulnerabilityResponseSchema),
      handler: async (args: any) => {
        const parsedArgs = JFrogCatalogVulnerabilityQuerySchema.parse(args);
        return await getVulnerabilityInfo(parsedArgs);
      }
    };
  • CatalogTools array groups catalog-related tools including jfrog_get_vulnerability_info for export and inclusion in main tools list.
    export const CatalogTools = [
      getCatalogPackageEntityTool, 
      getCatalogPackageVersionsTool,
      getCatalogPackageVersionVulnerabilitiesTool,
      getCatalogVulnerabilityInfoTool
    ];
  • tools/index.ts:13-23 (registration)
    Main tools registry: spreads all category tools arrays including CatalogTools, exposing jfrog_get_vulnerability_info globally via executeTool function.
    export const tools =[
      ...RepositoryTools,
      ...BuildsTools,
      ...RuntimeTools,
      ...AccessTools,
      ...AQLTools,
      ...CatalogTools,
      ...CurationTools,
      ...PermissionsTools,
      ...ArtifactSecurityTools,
    ];
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. The description mentions what information is returned ('including its affected packages and versions') but doesn't cover critical aspects like authentication requirements, rate limits, error handling, or whether this is a read-only operation. For a tool with no 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that gets straight to the point without unnecessary words. It's appropriately sized for the tool's complexity and front-loads the core purpose. However, it could be slightly more structured by explicitly separating purpose from included 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 no annotations and no output schema, the description provides basic purpose and return information but lacks completeness. It doesn't cover behavioral aspects like safety, performance, or error conditions, which are important for a tool that fetches vulnerability data. The description is adequate as a minimum but has clear gaps in contextual information.

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 description coverage is 100%, so the schema already documents all three parameters (cve_id, pageCount, pageSize) with clear descriptions. The description doesn't add any additional parameter semantics beyond what's in the schema, such as explaining the relationship between pageCount and pageSize or providing examples. Baseline 3 is appropriate when the schema does the heavy lifting.

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 a specific vulnerability information, including its affected packages and versions.' It specifies the verb 'get' and the resource 'vulnerability information' with additional detail about what information is included. However, it doesn't explicitly differentiate from sibling tools like 'jfrog_get_package_version_vulnerabilities' which might serve a similar purpose.

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 to get a specific vulnerability information,' which implies usage context but doesn't specify when to use this tool versus alternatives. No explicit when-not-to-use guidance or comparison to sibling tools is provided, leaving the agent to infer usage scenarios.

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