Skip to main content
Glama

Generate a CycloneDX or SPDX SBOM

generate_sbom
Read-only

Given the same inputs batch_query_vulnerabilities accepts — either a flat {packages:[...]} list, or raw package.json / lockfile / CycloneDX JSON / SPDX JSON content via content — emits a spec-valid CycloneDX 1.6 or SPDX 2.3 JSON document (pick with format, default 'cyclonedx') with npmscan's own OSV.dev vulnerability findings and registry license data embedded in each spec's native fields: CycloneDX gets a top-level vulnerabilities[] array (VEX analysis.state: 'in_triage' — an unreviewed automated finding, not a claim of exploitability) and per-component licenses[]; SPDX (which has no vulnerabilities array in 2.3) gets one externalRefs SECURITY/advisory entry per finding and licenseDeclared/licenseConcluded. Only a flat package inventory is known here, so the CycloneDX dependencies[] transitive graph and any SPDX package hierarchy are intentionally omitted rather than fabricated. Set includeVulnerabilities/includeLicenses to false to skip either enrichment pass (faster, no registry/OSV calls for that pass); pass policy (same shape as check_license_compliance) to also get per-package compliance context; componentName/componentVersion name the SBOM's own root component/document if known.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoSBOM format to emit. Default 'cyclonedx'.
policyNoLicense allow/deny policy, same shape as check_license_compliance. Omit for the default policy.
contentNoRaw dependency inventory content: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml, CycloneDX JSON, or SPDX JSON. Use this OR `packages`, not both.
packagesNoExplicit package list (1-1000 items, capped to 100 when includeLicenses is on). Use this OR `content`, not both.
componentNameNoName of the SBOM's own root component/document, if known.
includeLicensesNoResolve registry license data and embed it natively. Default true.
componentVersionNo
includeDevDependenciesNoIgnored when using `packages`; only applies when `content` is a manifest/lockfile format that distinguishes dev dependencies.
includeVulnerabilitiesNoQuery OSV.dev and embed findings natively. Default true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
sbomYes
formatYes
policyNo
warningsNo
inputFormatNo
ignoredCountNo
enrichmentNoteNo
parsedPackageCountYes
totalVulnerabilitiesYes
licenseViolationCountNo
packagesWithVulnerabilitiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Despite readOnlyHint/openWorldHint/destructiveHint annotations already establishing a safe read operation, the description adds substantial behavioral nuance: VEX analysis.state is 'in_triage' and unreviewed, not a claim of exploitability; omitted dependency graphs are deliberately not fabricated; includeVulnerabilities/includeLicenses control costly enrichment passes; and format-specific output placement is disclosed.

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 dense but purposeful: every clause contributes output semantics, format behavior, or parameter interplay. It is front-loaded with the core purpose and the details follow logically, though the single unbroken paragraph could be restructured with line breaks or bullets for easier parsing.

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

Completeness5/5

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

For a tool with 9 parameters, nested objects, and format-specific output behavior, the description is remarkably complete: it covers accepted input formats, output format selection, enrichment defaults and toggles, policy integration, VEX semantics, and intentional limitations. Since an output schema exists, the description does not need to separately enumerate return values.

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?

With 89% schema description coverage, the schema already documents most parameters, so the baseline is 3. The description adds real semantic value by explaining that `content` accepts package.json/lockfile/CycloneDX/SPDX JSON, that `packages` is an alternative input, that `policy` mirrors check_license_compliance, and that componentName/componentVersion label the root document.

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 is explicit: it generates a spec-valid CycloneDX 1.6 or SPDX 2.3 SBOM document, naming the concrete output, formats, and embedded vulnerability/license data. It also distinguishes itself from sibling tools like batch_query_vulnerabilities and check_license_compliance by referencing their input/policy shapes while making clear the deliverable is an SBOM.

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

Usage Guidelines4/5

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

The description gives strong contextual guidance: it reuses the batch_query_vulnerabilities input contract, accepts content or packages, points to check_license_compliance for the policy shape, and explains when enrichment passes can be skipped. It does not explicitly state 'use this instead of X when...', so it falls just short of full exclusion-level guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources