Skip to main content
Glama

generate_legal_notices_from_purls

Generate legal notices by downloading packages from registries using a list of Package URLs (PURLs). Use when dependencies are not available locally.

Instructions

ALTERNATIVE TOOL: Generate legal notices from PURL list (downloads from registries - SLOWER).

Use this tool ONLY when:

  • Dependencies are NOT installed locally (no node_modules/, site-packages/)

  • You already have a list of PURLs from another source

  • You're working with a PURL list, not source code

⚠️ PERFORMANCE WARNING: This downloads packages from registries (slow)

  • Downloads each package from npm/PyPI/etc (1-2 seconds per package)

  • For 49 packages: ~60-120 seconds

  • Use generate_legal_notices(path=...) instead if you have source code

⚠️ CRITICAL: DO NOT manually extract PURLs from package.json or requirements.txt!

  • WRONG: Reading package.json, extracting "http-server@14.1.1" → 1 PURL

  • RIGHT: Use scan_directory() to get ALL transitive dependencies → 49 PURLs

  • Example: npm project with 1 dependency = ~50 packages in node_modules (all needed!)

WHEN TO USE THIS TOOL:

  • Source code not available locally

  • Working with a pre-existing PURL list

  • Dependencies not installed (no node_modules/ or site-packages/)

WHEN NOT TO USE (use generate_legal_notices instead):

  • You have source code with dependencies installed locally

  • npm project with node_modules/ → Use generate_legal_notices(path=...)

  • Python project with virtualenv → Use generate_legal_notices(path=...)

Args: purls: List of Package URLs (e.g., ["pkg:npm/express@4.0.0", "pkg:pypi/django@4.2.0"]) output_format: Output format - "text" (default), "html", "markdown" output_file: Optional path to save the output file include_license_text: If True, include full license texts (default: True)

Returns: Dictionary containing: - notices: The generated legal notices text - packages_processed: Number of packages successfully processed - packages_failed: Number of packages that failed processing - output_file: Path to saved file (if output_file was specified) - format: The output format used - mode: "download_purls" (indicates registry downloads were used)

Examples: # Generate notices from PURL list (after scan_directory) scan_result = scan_directory("/path/to/project") purls = [pkg["purl"] for pkg in scan_result["packages"]] generate_legal_notices_from_purls( purls=purls, output_file="NOTICE.txt" )

# Generate HTML notices from specific PURLs
generate_legal_notices_from_purls(
    purls=["pkg:npm/express@4.21.2", "pkg:npm/body-parser@1.20.3"],
    output_format="html",
    output_file="NOTICE.html"
)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
purlsYes
output_fileNo
output_formatNotext
include_license_textNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: performance warning (slow downloads), the fact that it downloads packages from registries, and the output mode in the return dictionary. It also cautions against incorrect usage, ensuring the agent understands the tool's cost and correct workflow.

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 lengthy but well-organized into sections (performance warning, critical note, when to use/not use, args, returns, examples). Every sentence serves a purpose, but the level of detail could be trimmed slightly without losing clarity. The structure aids readability and prioritizes critical information.

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, sibling alternative), the description is thorough. It covers parameter semantics, return values, performance characteristics, pitfalls, and example workflows. The output schema is provided, so return value explanation is sufficient. There are no gaps in context for effective tool 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?

The input schema provides basic parameter types and defaults (e.g., output_format defaulting to 'text', include_license_text defaulting to true). The description adds semantic value by explaining the 'purls' parameter as a list of Package URLs, describing the purpose of each parameter, and providing concrete examples. However, the schema already conveys some information, so the description's additional value is moderate.

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 generates legal notices from a PURL list and distinguishes itself from the sibling tool 'generate_legal_notices' by specifying when each should be used. It provides a specific verb ('generate legal notices') and resource ('PURL list'), making the purpose unambiguous.

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?

The description provides explicit when-to-use (dependencies not installed, have PURL list) and when-not-to-use (source code available, use generate_legal_notices) guidance. It also includes a critical warning against manual PURL extraction and illustrates proper usage with scan_directory examples.

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