Skip to main content
Glama

WritersLogic verifiable AI agents

spdx-policy

SPDX license expression parse and policy check — Parses up to 50 SPDX license expressions (AND, OR, WITH exceptions, + or-later, LicenseRef) and evaluates each against a caller policy (allow list, deny list, allowed exceptions, OSI/FSF flags, copyleft tier) for agents vetting dependency licenses. Returns the canonical expression, per-license flags from the pinned SPDX License List, the verdict, and which licenses satisfy an OR. Does not detect l

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "expressions": "<expressions>"
    },
    "name": "spdx-policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
denyNoSPDX ids that always fail.
allowNoIf non-empty, only these SPDX ids pass (GPL-2.0-only and GPL-2.0 are the same entry; GPL-2.0+ means or-later and must be listed as such).
expressionsYesSPDX expressions, e.g. 'MIT OR (GPL-2.0-only WITH Classpath-exception-2.0)'.
denyCopyleftNoId-family heuristic: strong = GPL/AGPL/SSPL/EUPL/OSL/CC-BY-SA; any adds LGPL/MPL/EPL/CDDL and similar.
allowDeprecatedNoDefault true: deprecated ids only add a witness. false: they fail.
allowExceptionsNoIf non-empty, only these WITH exception ids pass.
requireFsfLibreNoFail licenses without isFsfLibre in the SPDX list.
allowLicenseRefsNoLicenseRef-* ids the caller has reviewed; other refs yield unknown.
requireOsiApprovedNoFail licenses without isOsiApproved in the SPDX list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden; it does cover the 50-expression cap, canonicalization, per-license flags from a pinned SPDX list, the verdict, and OR-satisfaction reporting. It is silent on malformed-expression handling, behavior for LicenseRef-* yielding 'unknown', determinism, and any auth or rate constraints, which matters for a policy-gating tool.

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?

One dense, front-loaded sentence that leads with purpose, then accepted input forms, then policy dimensions, then return contents — good ordering with no filler. The final sentence is cut off mid-word, leaving an incomplete thought in the definition.

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?

For a 9-parameter, no-output-schema policy tool the description does outline what comes back and the batch limit, which is the main gap-filler. However, it never explains precedence among conflicting policy inputs, what verdict values exist, or what happens on parse failure — details an agent needs before wiring this into a gate.

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%, so every parameter including enums and defaults is already documented in the schema. The description's line-up of policy levers (allow/deny lists, allowed exceptions, OSI/FSF flags, copyleft tier) mirrors those parameters without adding syntax, precedence, or interaction rules (e.g., how allow and deny combine). Baseline 3 applies.

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?

States a specific verb and resource ('SPDX license expression parse and policy check'), enumerates the accepted syntax (AND, OR, WITH, + or-later, LicenseRef), the policy dimensions evaluated, and the intended caller ('agents vetting dependency licenses'). The trailing 'Does not detect l...' clause signals a scope boundary against the license-identify sibling.

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 usage context (vetting dependency licenses) and an explicit negative boundary via the 'Does not detect' sentence, but that sentence is truncated and no alternative tool is named for the excluded case. An agent knows the situation to use it in, but not which sibling to reach for otherwise.

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.

Resources