Skip to main content
Glama

License Compliance Scan

license_compliance_scan
Read-onlyIdempotent

Evaluate package licenses against an SPDX compliance policy. Classifies each license as allowed, warn, or blocked to enforce license compliance on dependencies.

Instructions

Evaluate package licenses against an SPDX compliance policy.

    Takes packages (either a prior ``scan`` result JSON or an explicit array
    of ``{name, version, ecosystem, license}`` objects) and classifies each
    license as allowed, warn, or blocked. Normalizes 2,500+ SPDX IDs
    (including deprecated identifiers) and flags network-copyleft licenses
    (AGPL/SSPL/BUSL and similar).

    Args:
        scan_json: JSON of a previous scan result, or a JSON array of
            package objects with license metadata.
        policy_json: Optional JSON policy with ``license_block`` /
            ``license_warn`` glob lists. Falls back to the built-in policy
            (block strong/network copyleft, warn weak copyleft) when empty.

    Returns:
        JSON with per-package license verdicts, the matched policy rule,
        and counts of blocked / warned / allowed packages.

    Call this in release or procurement gates to enforce license policy on
    an agent's dependency set without running a full scan.
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scan_jsonYesJSON string of a previous scan result (from the 'scan' tool) containing agents with packages. Or a JSON array of {"name": "pkg", "version": "1.0", "ecosystem": "npm", "license": "MIT"} objects.
policy_jsonNoOptional JSON policy: {"license_block": ["GPL-*"], "license_warn": ["LGPL-*"]}. Uses default policy (block GPL/AGPL/SSPL/BUSL/EUPL/OSL, warn LGPL/MPL/EPL/CDDL) if empty.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. The description adds behavioral details: normalizing 2,500+ SPDX IDs, flagging network-copyleft licenses, and returning verdicts with matched policy. It provides context beyond the annotations without contradicting them.

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?

The description is concise, structured with clear sections, and contains no redundant information. Every sentence serves a purpose: purpose, inputs, behavior, output, and usage context.

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?

Given the tool's complexity (license compliance, policy, SPDX normalization) and the presence of annotations and output schema, the description is mostly complete. It covers purpose, inputs, behavior, and output summary. A brief mention of error handling or edge cases would improve completeness, but it is sufficient for correct usage.

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% with both parameters described. The description largely reiterates the schema for scan_json and policy_json, adding minor context about the default policy. Since the schema already does the heavy lifting, the description does not add significant new meaning beyond what is in the schema.

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 clearly states the tool evaluates package licenses against an SPDX compliance policy, specifying the verb 'evaluate' and resource 'package licenses'. It distinguishes from sibling tools like 'scan' by noting it works on prior scan results or explicit arrays and is meant for release/procurement gates without a full scan.

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 provides clear when-to-use guidance: 'Call this in release or procurement gates to enforce license policy on an agent's dependency set without running a full scan.' It also implies alternatives by referencing the scan tool. However, it does not explicitly state when not to use this tool.

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

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/msaad00/agent-bom'

If you have feedback or need assistance with the MCP directory API, please join our Discord server