Skip to main content
Glama

audit_lockfile_compliance

Read-onlyIdempotent

Parse package-lock.json, pnpm-lock.yaml, Cargo.lock, poetry.lock, or uv.lock offline to detect SPDX copyleft/SaaS license contamination and supply-chain hazards in transitive dependencies.

Instructions

Parses package-lock.json (v1/v2/v3), pnpm-lock.yaml, Cargo.lock, poetry.lock, or uv.lock offline and evaluates transitive SPDX copyleft/SaaS license contamination and supply-chain hazards.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_lockfile_compliance"
  }
}

Input Schema

NameRequiredDescriptionDefault
includeDevNoWhen true, enforces production license blockers on devDependencies as well as runtime dependencies (defaults to false; supply-chain hooks always scan both).
filenameHintNoOptional filename hint (e.g. "package-lock.json", "pnpm-lock.yaml", "Cargo.lock", "uv.lock", "poetry.lock") to assist format detection.
lockfilePathNoOptional local file path to a lockfile on disk when lockfileContent is omitted.
deploymentModeNoTarget distribution policy mode: "saas" (hosted network SaaS), "binary" (proprietary client/SDK/on-prem installer), or "internal" (in-house tool only).
allowedPackagesNoOptional list of legal-approved package names or name@version identifiers exempted from blocking.
lockfileContentNoRaw text content of package-lock.json, pnpm-lock.yaml, Cargo.lock, poetry.lock, or uv.lock evaluated strictly in local memory.
licenseOverridesNoOptional map of package name or name@version to legal-verified SPDX expression (e.g. {"legacy-pkg": "MIT"}).
failOnUnknownLicenseNoWhen true, flags dependencies without a declared SPDX license identifier as HIGH severity findings.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds that parsing is offline and that analysis reaches transitive dependencies, which is real context, but it says nothing about what findings look like, severity tiers, or that one of lockfilePath/lockfileContent must be supplied — so the added value is modest.

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?

A single dense sentence that front-loads the supported formats and the analysis goal with no redundant framing. It is appropriately sized for the tool, though the format list is long enough to slightly dilute the key action verb.

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

Completeness4/5

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

For an offline, read-only auditing tool with full schema coverage and no output schema, the description is close to sufficient. Missing pieces an agent would want: the fact that lockfilePath and lockfileContent are effectively mutually exclusive inputs and the form of the finding output, but neither prevents correct invocation.

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 every parameter including includeDev, deploymentMode, licenseOverrides and failOnUnknownLicense is already explained in the schema. The description contributes no additional parameter meaning such as the interaction between deploymentMode and blocking behavior, so the baseline 3 applies.

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 gives a specific verb (parses, evaluates) and resource (lockfile formats enumerated: package-lock.json v1/v2/v3, pnpm-lock.yaml, Cargo.lock, poetry.lock, uv.lock) plus the analysis target (transitive SPDX copyleft/SaaS license contamination and supply-chain hazards). It does not distinguish itself from the sibling tools evaluate_spdx_expression_policy and scan_supply_chain_hazards, which sound adjacent, so it stops short of a 5.

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?

There is no when-to-use or when-not-to-use guidance and no routing to alternatives, even though scan_supply_chain_hazards and evaluate_spdx_expression_policy appear to overlap with parts of this tool's stated job. The only implicit usage signal is 'offline' and 'transitive', which an agent must infer into a calling condition.

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