Skip to main content
Glama

license_inventory

Read-onlyIdempotent

List dependency licenses from lockfiles or installed packages, grouped by SPDX expression with sources, and flag unknown or ambiguous entries.

Instructions

List every dependency's license, grouped, with where each answer came from.

path is a project directory (lockfiles are found up to 3 levels down) or one lockfile. License sources, in priority order: (1) packages already installed - a Python venv at .venv/venv next to the lockfile, or the one you give as python (a venv dir, its python executable, or a site-packages dir), node_modules, ~/.cargo/registry; (2) data in the lockfile itself (package-lock.json has it); (3) a network lookup against PyPI / npm / crates.io, ONLY if online=true. Anything none of these answers is UNKNOWN - never guessed.

The output groups packages by normalised SPDX expression with direct/transitive counts, lists UNKNOWN packages with the reason, shows dual-licensed (OR) packages and which option applies (allow is an optional list of SPDX ids you accept; otherwise the least restrictive option is shown), and flags ambiguous spellings such as plain 'BSD'.

Input Schema

NameRequiredDescriptionDefault
pathNo.
allowNo
onlineNo
pythonNo
list_limitNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only cover read-only/idempotent safety, but the description adds the behavior that actually matters for trust: a strict source priority ladder, no network access unless online=true, and a hard 'never guessed' rule that routes unresolved cases to UNKNOWN with a reason. It also previews how ambiguity (dual-licensed OR, plain 'BSD') is surfaced rather than silently resolved.

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?

Front-loaded with the core purpose, then organized into source priority, output shape, and licensing edge cases. It is dense with nested parentheticals (the 'python' parameter alone packs three forms into one clause), which slows parsing slightly, but no sentence is redundant.

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?

An output schema exists, yet the description still usefully frames what the report contains: grouped SPDX expressions, direct/transitive counts, UNKNOWN reasons, dual-license options. Combined with named license sources and the offline-by-default rule, an agent can call this confidently; the sole gap is the undocumented list_limit parameter.

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?

Schema description coverage is 0%, so the description carries the full burden and mostly does: 'path' scoping and search depth, 'python' accepted forms (venv dir, python executable, or site-packages dir), 'online' as the network gate, and 'allow' as an optional SPDX allow-list controlling which OR option is reported. Only 'list_limit' is left completely unexplained.

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?

Opens with a specific verb and resource: 'List every dependency's license, grouped, with where each answer came from.' The provenance angle plus grouping distinguishes it from siblings like check_policy (policy evaluation) and generate_notices (artifact generation) without needing schema inspection.

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?

Gives clear operating context: 'path' can be a project dir or a single lockfile, lockfiles are searched 3 levels down, and network lookup only happens when online=true. It never explicitly names an alternative or says when-not to use it versus check_policy or compatibility, so it stops short of full when/when-not guidance.

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