Skip to main content
Glama

check_policy

Read-onlyIdempotent

Evaluates dependency licenses against allow/deny rules and project compatibility, returning ok, needs review, or violation verdicts with reasons.

Instructions

Give each dependency a verdict - ok / needs review / violation - with reasons.

Policy comes from the arguments or from a .license-policy.toml in path (arguments win, key by key). Entries in allow/deny are SPDX ids ('MIT', 'GPL-2.0' is read as GPL-2.0-only), wildcards ('BSD-*'), or category names: public-domain, permissive, weak-copyleft, strong-copyleft, network-copyleft, source-available, noncommercial, restricted, proprietary. The TOML file may also hold project_license = "..." and an [exceptions] table mapping a package name (or name@version) to the reason you accepted it.

Rules: deny beats allow; with an allow list, anything known and not on it is a violation; otherwise, if project_license is given, each dependency is judged by the compatibility table (compatible = ok, conditional = needs review, incompatible = violation); with neither, permissive licenses are ok, weak copyleft (LGPL/MPL/EPL) needs review with linking notes, and strong/network copyleft, source-available and non-commercial licenses are violations. UNKNOWN and unclassified licenses always need review. OR expressions take the best option for you, AND expressions the worst. Same license sources as license_inventory.

Input Schema

NameRequiredDescriptionDefault
denyNo
pathNo.
allowNo
limitNo
onlineNo
pythonNo
show_okNo
project_licenseNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior5/5

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

Goes well past the readOnly/idempotent annotations by disclosing the entire decision procedure: deny beats allow, allow-list makes unknown-on-list violations, project_license triggers the compatibility table, and the no-policy fallback treats permissive as ok and strong/network copyleft as violations. It also covers argument-vs-TOML precedence, exceptions, UNKNOWN handling, and OR/AND expression resolution. This is behavior an agent could not infer from annotations or schema.

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 verdict definition, then policy sources, then the rule ladder — a sensible order. The taxonomy lists (categories, license families) are long but each entry is load-bearing for the rules. The trailing 'Same license sources as license_inventory' is the only loose thread.

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

Completeness3/5

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

The output schema and annotations cover the return shape and safety profile, and the policy semantics are thoroughly specified. The gap is the four undocumented inputs (limit, online, python, show_ok), which an agent cannot reason about from either the schema or 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?

With 0% schema description coverage the description must carry all eight parameters, and it does explain deny, allow, path, project_license and the TOML file lookup well. However, limit, online, python and show_ok are never mentioned, leaving half the surface undefined in both schema and prose.

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?

Opens with a concrete verb and output shape: 'Give each dependency a verdict - ok / needs review / violation - with reasons.' That tells an agent exactly what resource is acted on and what comes back. It doesn't name the sibling it competes with (compatibility, which presumably judges a single pair), so sibling differentiation is implied rather than stated.

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?

Usage is only implied: the tool evaluates a whole project's dependencies against a policy, and 'Same license sources as license_inventory' hints at the relationship, but there is no explicit 'use this when, not that' guidance. Nothing tells the agent when to reach for compatibility or explain_license instead, and no preconditions are stated.

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