Skip to main content
Glama

Parse an SPDX license expression

inspect_license
Read-onlyIdempotent

Parse an SPDX 2.3 license expression and identify each license or exception in the bundled SPDX License List, with OSI/FSF flags, deprecation and official links. When to use: Use when a package declares a license expression and you need to know what each identifier is. It gives no compatibility or legal advice. Notes: No account or token needed. Example arguments: {"expression":"(MIT OR Apache-2.0) AND BSD-3-Clause"}

Input Schema

NameRequiredDescriptionDefault
expressionYesSPDX license expression, up to 4,096 characters.

Output Schema

NameRequiredDescriptionDefault
astYes
errorNo
scopeYes
validYes
sourcesYes
identifiersYes
normalizedExpressionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / expression / description
      Added value: +"SPDX license expression, up to 4,096 characters."
  2. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, destructiveHint=false, and openWorldHint=false, so the safety profile is covered. The description adds useful context beyond annotations: no account or token needed, no compatibility/legal advice, and the specific bundled SPDX License List output content. It does not describe invalid-expression handling, but the output schema exists for return details.

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 front-loaded with the core action and output, followed by structured 'When to use', 'Notes', and example sections. Every sentence adds useful information, and the example earns its place by clarifying expression syntax.

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?

For a single-parameter parsing tool with rich annotations and an output schema, the description covers purpose, usage, authentication needs, scope limitations, and expected output content. Invalid-input behavior is reasonably left to the schema/error response, so nothing critical is missing for correct invocation.

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?

With one parameter and 100% schema description coverage, the schema already defines the expression input and its 4,096-character limit; baseline is 3. The description adds the SPDX 2.3 version and a concrete example expression, which meaningfully clarifies expected syntax beyond 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?

States a specific verb ('Parse') and resource ('SPDX 2.3 license expression'), then names the exact output content: identified licenses/exceptions with OSI/FSF flags, deprecation, and official links. An agent can distinguish this from unrelated sibling tools such as validate_package_json or check_semver_range without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides an explicit 'When to use' trigger: a package declares a license expression and the agent needs to know what each identifier is. It also sets a scope exclusion by stating it gives no compatibility or legal advice. No sibling tool is a direct alternative, so the absence of a named alternative is not a gap.

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