Skip to main content
Glama

Generate a software bill of materials

codeinspectus_generate_sbom
Idempotent

Generate a CycloneDX or SPDX SBOM for a project to inventory dependencies offline; uses Trivy plus Pub lockfiles, falls back to native Pub, and returns the file path and component count.

Instructions

Generate a CycloneDX or SPDX SBOM for the target project using Trivy plus the first-party offline Pub lockfile inventory, with native Pub fallback when Trivy is unavailable. Writes the SBOM file to the chosen output path and returns its location and component count. Offline.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute path to the project to generate an SBOM for.
formatNoSBOM format (default: cyclonedx).
output_pathNoAbsolute .json path for the SBOM. An existing file is replaced only if it is already a CycloneDX/SPDX SBOM. Default: ~/.codeinspectus/sbom/<project>.<fmt>.json.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
formatYes
offlineYes
generatedYes
providersYes
ecosystemsYes
limitationsYes
output_pathYes
coverage_stateYes
component_countYes
lockfiles_analyzedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv3.3.1
    • changedInput schema / properties / output_path / description
      Previous value: -"Where to write the SBOM file. Default: ~/.codeinspectus/sbom/<project>.<fmt>.json."New value: +"Absolute .json path for the SBOM. An existing file is replaced only if it is already a CycloneDX/SPDX SBOM. Default: ~/.codeinspectus/sbom/<project>.<fmt>.json."
    • addedInput schema / properties / path / minLength
      Added value: +1
  2. Changed8 schema fields changedv2.5.0
    • changedInput schema / properties / output_path / description
      Previous value: -"Where to write the SBOM file. Default: <path>/codeinspectus-sbom.<fmt>.json."New value: +"Where to write the SBOM file. Default: ~/.codeinspectus/sbom/<project>.<fmt>.json."
    • addedOutput schema / properties / coverage_state
      Added value: +{
      +  "enum": [
      +    "combined",
      +    "native_only",
      +    "trivy_only",
      +    "unavailable"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / ecosystems
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / limitations
      Added value: +{
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / lockfiles_analyzed
      Added value: +{
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedOutput schema / properties / offline
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / providers
      Added value: +{
      +  "items": {
      +    "enum": [
      +      "trivy",
      +      "codeinspectus-pub"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "format",
      -  "output_path",
      -  "component_count",
      -  "generated"
      -]New value: +[
      +  "format",
      +  "output_path",
      +  "component_count",
      +  "generated",
      +  "offline",
      +  "providers",
      +  "ecosystems",
      +  "coverage_state",
      +  "lockfiles_analyzed",
      +  "limitations"
      +]
  3. First observedv0.2.1

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly=false, idempotent=true, destructive=false. The description adds that it writes a file to the chosen output path, uses Trivy plus a first-party offline Pub lockfile inventory with native Pub fallback, and can overwrite existing SBOM files — meaningful context beyond annotations.

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?

Two tight sentences, front-loaded with the core action and backend mechanism. No filler.

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?

Covers what it generates, the tools/fallback, output behavior, and that it returns location and component count. An output schema exists, so return-value details needn't be in the description.

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 coverage is 100%, so parameters are fully documented in the schema. The description adds little parameter-specific detail beyond 'chosen output path'; baseline 3 applies.

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?

States a specific verb (Generate), resource (CycloneDX or SPDX SBOM), and target (the project). Distinguishes itself from scan/rescan siblings by producing a BOM artifact rather than scanning findings.

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

Usage Guidelines3/5

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

Implied that this is for producing an SBOM, but no explicit when-to-use vs. siblings like codeinspectus_compliance_report or scan. No prerequisites or exclusions stated.

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