Skip to main content
Glama

Check a dependency list against a license policy

check_license_compliance
Read-only

Given a list of packages (name + optional exact version or semver range — e.g. straight from a package.json "dependencies" object) and an optional allow/deny license policy, resolves each package's declared SPDX license and reports a compliance verdict per package. Classifies every license into one of permissive/weak-copyleft/copyleft/network-copyleft/proprietary/public-domain/unknown, and understands simple SPDX expressions: "(MIT OR GPL-3.0)" is compliant if EITHER side is permitted (a consumer may legally pick the clean alternative), "MIT AND Apache-2.0" requires both sides to pass, and "X WITH exception" is judged on X. A mixed/nested expression like "(MIT OR ISC) AND Apache-2.0" is reported as needsReview rather than guessed at. policy.deny entries always win over policy.allow (so a name can appear in both without a silent contradiction); with policy.allow set, anything not matching it is a violation (unproven is treated as non-compliant); with neither given, the default policy flags only copyleft/network-copyleft/proprietary (e.g. GPL/AGPL/UNLICENSED) — weak-copyleft (LGPL/MPL/EPL) and unrecognized license strings are surfaced but not auto-flagged. Policy entries accept an exact SPDX id, a family prefix ("GPL" catches GPL-2.0/GPL-3.0-only/etc.), or a category name. This reads only the registry-declared license field — it does not fetch or parse LICENSE file contents from the source repository.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policyNoOmit entirely to use the default policy: only copyleft/network-copyleft/proprietary are violations.
packagesYes1-100 packages to check. version accepts an exact version or a semver range like "^4.17.21"; omitted = latest.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
policyYes
resultsYes
summaryYes
totalPackagesYes
compliantCountYes
violationCountYes
unresolvedCountYes
needsReviewCountYes

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/openWorld annotations, the description discloses important behavior: license classification categories, SPDX expression handling, policy precedence, default policy behavior, family-prefix matching, and the registry-field limitation. This gives agents a realistic model of how the tool will behave without overpromising.

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 long and dense, but every sentence adds operational detail that would otherwise need to be inferred from examples. It is front-loaded with the core purpose before diving into edge cases, though a bit more whitespace or bullet structure could aid quick scanning.

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?

Given the complexity of the tool (nested policy object, expression semantics, default policy, exclusion behavior) and the existing output schema, the description covers all necessary context. An agent can correctly construct inputs and anticipate verdict outcomes without additional external knowledge.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Even though schema coverage is 100%, the description enriches parameter meaning substantially: it explains how semver ranges are interpreted, that deny always overrides allow, how family prefixes and categories match, and what happens when policy is omitted. These are not obvious from the schema alone and directly affect how an agent should build the parameters.

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 states a specific action: check a package list against a license policy and report per-package compliance. It clearly identifies the resource (dependency list with SPDX licenses) and the verdict output, and it is distinct from the sibling tools like analyze_transitive_dependencies or query_vulnerabilities.

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 a clear use case: resolve license compliance for packages with an optional allow/deny policy. It also provides a notable exclusion ('does not fetch or parse LICENSE file contents from the source repository'), which helps agents avoid misusing it. However, it does not explicitly name alternative sibling tools or state conditions for choosing them.

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.

TDQS

A4.3/5.0
Disambiguation4/5

Each tool targets a distinct workflow—install script analysis, transitive dependency resolution, batch OSV queries, provenance verification, CVE lookup, advisory browsing, package metadata, exact-version checks, single-package vuln checks, and search. The only mild overlap is that several get_/query_ tools return vulnerability data, but the descriptions clearly delineate when to use each.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern: get_package, query_vulnerabilities, analyze_transitive_dependencies, check_package_provenance, etc. There are no mixed casing styles or vague verbs, making the set highly predictable.

Tool Count5/5

10 tools is well-scoped for an npm security scanning server. Each tool earns its place by covering a distinct facet of the domain without redundancy or bloat.

Completeness4/5

The surface covers package discovery, metadata, exact-version vulnerability checks, batch scanning, transitive graph analysis, install-script heuristics, provenance, advisories, and CVE enrichment. Minor gaps remain—e.g. no full tarball code review and maintainer-history red flags are explicitly out of scope—but core agent workflows are covered.

Resources