{"uid":"cap_T3MUJjaM8IXZr3STA5W5f","slug":"writerslogic-spdx-license-policy-evaluator-a246b56e","name":"WritersLogic SPDX License Policy Evaluator","description":"Pay-per-call agents settled in USDC on Base via x402. Every response carries a signed provenance envelope.","url":"https://agents.writerslogic.com/api/v1/spdx-policy?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"deny":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":200,"description":"SPDX ids that always fail."},"allow":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":200,"description":"If 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)."},"expressions":{"type":"array","items":{"type":"string","maxLength":500},"maxItems":50,"minItems":1,"description":"SPDX expressions, e.g. 'MIT OR (GPL-2.0-only WITH Classpath-exception-2.0)'."},"denyCopyleft":{"enum":["none","strong","any"],"type":"string","description":"Id-family heuristic: strong = GPL/AGPL/SSPL/EUPL/OSL/CC-BY-SA; any adds LGPL/MPL/EPL/CDDL and similar."},"allowDeprecated":{"type":"boolean","description":"Default true: deprecated ids only add a witness. false: they fail."},"allowExceptions":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":100,"description":"If non-empty, only these WITH exception ids pass."},"requireFsfLibre":{"type":"boolean","description":"Fail licenses without isFsfLibre in the SPDX list."},"allowLicenseRefs":{"type":"array","items":{"type":"string","maxLength":100},"maxItems":100,"description":"LicenseRef-* ids the caller has reviewed; other refs yield unknown."},"requireOsiApproved":{"type":"boolean","description":"Fail licenses without isOsiApproved in the SPDX list."}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_PSMMztOQd2zhStUrwx8RT","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Parses SPDX license expressions and evaluates each against a caller-defined policy (allow/deny lists, copyleft tier, OSI/FSF flags) to verdict dependency licenses as pass or fail.","exampleAgentPrompt":"Check these SPDX expressions — 'MIT', 'GPL-2.0-only', 'Apache-2.0 AND LGPL-2.1-or-later', and 'MIT OR (GPL-2.0-only WITH Classpath-exception-2.0)' — against a policy that allows only OSI-approved licenses, denies GPL-2.0-only, blocks any strong copyleft, and permits the Classpath-exception-2.0 exception.","exampleUseCases":[{"title":"CI gate for open-source dependency compliance","prompt":"Before we merge this PR, check these 12 SPDX license expressions from our new dependencies — including 'LGPL-2.1-or-later', 'MIT', 'Apache-2.0', and 'AGPL-3.0-only' — against our policy: allow list is MIT and Apache-2.0 only, deny strong copyleft, and require OSI-approved licenses."},{"title":"Audit a mixed dependency bundle for copyleft risk","prompt":"Scan these SPDX expressions — 'GPL-2.0-or-later', 'MPL-2.0', 'BSD-2-Clause', 'EPL-2.0', 'MIT' — and tell me which ones would fail a policy that blocks any copyleft tier and disallows deprecated license IDs."},{"title":"Validate reviewed LicenseRef exceptions in proprietary stack","prompt":"We have some custom LicenseRef licenses we've manually reviewed: LicenseRef-our-internal and LicenseRef-vendor-agreement. Check whether the expressions 'LicenseRef-our-internal AND MIT' and 'Apache-2.0 OR LicenseRef-vendor-agreement' pass our policy that requires FSF-libre compliance and allows those two LicenseRefs."}],"resultDescription":"For each submitted SPDX expression, the endpoint returns the canonical parsed form of the expression, per-license metadata flags from the pinned SPDX License List (OSI approved, FSF libre, deprecated), the policy verdict (pass/fail/unknown), and — for OR expressions — which branch of licenses satisfies the policy. Copyleft tier is provided as an id-family heuristic label.","failureModes":["Malformed SPDX expression causes a parse error for that entry","Unknown LicenseRef not in allowLicenseRefs yields an 'unknown' verdict rather than a hard failure","More than 50 expressions submitted triggers a validation error","License ID not found in the pinned SPDX list may result in unknown flags","Deprecated IDs with allowDeprecated=false cause a fail verdict","Contradictory allow and deny list entries may produce unexpected verdicts"],"whenToPreferThis":"Use this endpoint when an AI agent needs to programmatically vet software dependency licenses at scale — especially in CI/CD pipelines, package ingestion workflows, or policy enforcement gates — where SPDX expression parsing, copyleft tier classification, and allow/deny policy evaluation are all needed in a single call. Prefer it over manual license lookups when you need batch evaluation (up to 50 expressions), structured flag metadata from the SPDX License List, and machine-readable verdicts with OR-branch resolution. Do not use it for detecting licenses from raw source text or reading package manifests directly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-19T06:38:10.873Z","isFirstParty":false,"canonicalSlug":"writerslogic-spdx-license-policy-evaluator-a246b56e"}