Skip to main content
Glama

validate_policy

Validate licenses against organizational policies for mobile, commercial, SaaS, and other distribution types. Returns clear approve or deny decisions.

Instructions

Validate if licenses are approved or rejected for a specific project/distribution type.

This tool evaluates licenses against organizational policies and returns clear APPROVE or DENY decisions based on the distribution type. This is the primary tool for answering: "Can I use these licenses for my [mobile/commercial/saas/etc] project?"

Key Use Cases:

  • Check if licenses are approved for mobile app distribution

  • Validate licenses for commercial products

  • Ensure SaaS deployment compliance

  • Verify licenses for embedded systems

  • Check licenses for any distribution type

Returns clear approve/deny decisions:

  • action: "approve" (licenses are allowed), "deny" (licenses blocked), or "review" (manual review needed)

  • severity: "info" (approved), "warning" (review), "error" (denied)

  • message: Explanation of the decision

  • requirements: What must be done to comply (if approved)

  • remediation: How to fix the issue (if denied)

Args: licenses: List of SPDX license IDs to validate (e.g., ["MIT", "Apache-2.0", "GPL-3.0"]) policy_file: Optional custom policy directory (uses enterprise defaults if not provided) distribution: Distribution type - determines policy rules: - "mobile": iOS/Android apps (blocks GPL, allows permissive) - "commercial": Commercial products (blocks strong copyleft) - "saas": Software as a Service (blocks AGPL, allows GPL) - "embedded": Embedded systems (blocks copyleft) - "desktop": Desktop applications - "web": Web applications - "open_source": Open source projects (allows most licenses) - "internal": Internal use only (allows all) context: Optional usage context (e.g., "static_linking", "dynamic_linking")

Returns: Dictionary with: - licenses: List of licenses evaluated - distribution: Distribution type used - context: Context evaluated - result.action: "approve", "deny", or "review" - result.severity: "info" (approved), "warning" (review), or "error" (denied) - result.message: Human-readable decision explanation - result.requirements: List of compliance requirements (if approved) - result.remediation: Suggested fix (if denied, e.g., "Replace with MIT alternative") - using_default_policy: Whether default enterprise policy was used

Examples: # Check if licenses are approved for mobile app validate_policy(["MIT", "Apache-2.0"], distribution="mobile") → action: "approve" ✓

# Check GPL for mobile (will be denied)
validate_policy(["GPL-3.0"], distribution="mobile")
→ action: "deny", remediation: "Replace with permissive alternative"

# Check licenses for commercial distribution
validate_policy(["MIT", "LGPL-2.1", "Apache-2.0"], distribution="commercial")
→ action: "approve" or "review" depending on policy

# Check AGPL for SaaS (will be denied)
validate_policy(["AGPL-3.0"], distribution="saas")
→ action: "deny", reason: "Network copyleft requires source disclosure"

Workflow Integration: 1. After scanning: scan_directory() → extract licenses → validate_policy() 2. Quick check: validate_policy(["GPL-3.0"], distribution="mobile") → see if approved 3. Policy enforcement: validate_policy() → if action=="deny" → block deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextNo
licensesYes
policy_fileNo
distributionNobinary

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations provided, the description carries the full burden. It thoroughly explains the tool's behavior: returns approve/deny/review decisions, describes output fields, and lists distribution-specific rules. However, it does not explicitly state that the tool has no side effects or is read-only, though the validation nature implies this.

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?

The description is well-structured with clear sections for purpose, use cases, return values, args, examples, and workflow. It is slightly verbose but every section adds value. The front-loading of purpose and key use cases is effective.

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?

Given the tool's complexity (4 parameters, output schema), the description is fully complete. It covers all input parameters, output fields, behavior per distribution type, and provides multiple examples. It integrates with workflow and addresses typical use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must compensate. It does so excellently: explains each parameter in detail (licenses as SPDX IDs, policy_file optional, distribution types with policies, context examples), provides allowed values, and includes examples showing parameter usage.

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?

The description clearly states the tool's purpose: validate licenses against organizational policies for a specific distribution type. It uses specific verbs and resources, and distinguishes itself from sibling tools by positioning itself as the primary tool for answering 'Can I use these licenses for my project?'.

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?

The description provides extensive usage context, including key use cases (mobile, commercial, SaaS, etc.) and workflow integration (post-scan, quick check, enforcement). It does not explicitly mention when not to use this tool or direct to alternatives, but given the clear use cases, it is well-guided.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SemClone/mcp-semclone'

If you have feedback or need assistance with the MCP directory API, please join our Discord server