Skip to main content
Glama
conan-io

Conan MCP Server

Official
by conan-io

get_conan_licenses

Extract license information from Conan dependency graph for packages in host context. Supports conanfile path or direct package references.

Instructions

Collect license information for Conan package dependencies.

This tool uses `conan graph info` to extract license information from the dependency
graph for all packages.

Only packages in the "host" context are analyzed (build context packages are excluded
as they are build-time tools and not included in the final product).

You can either provide a path to a conanfile OR a list of package references to check.
At least one of these must be provided.

Use this tool when you need to:
- Search for licenses of the project
- Extract license information
- Check license information 

Examples:
    - get_conan_licenses(work_dir="/home/user/project", path="conanfile.py")
    - get_conan_licenses(work_dir="~/my_project", path="conanfile.txt")
    - get_conan_licenses(work_dir="/tmp", requires=["zlib/1.2.11"])
    - get_conan_licenses(work_dir="/tmp", requires=["zlib/1.2.11", "fmt/10.0.0"])

Args:
    work_dir: Working directory where the command should be executed.
              This is the base directory from which all paths are resolved.
              Always required.
    path: Path to a folder containing a recipe or to a recipe file (conanfile.txt or conanfile.py).
          This path is ALWAYS relative to work_dir. Optional if requires is provided.
    requires: List of package references to check licenses for (e.g., ["zlib/1.2.11", "fmt/10.0.0"]).
              Each reference will be passed as a --requires flag to conan graph info.
              Optional if path is provided. At least one of path or requires must be provided.
    remote: Optional remote name to search in (searches all remotes if not specified)
    build_profile: Profile to the build context.
    host_profile: Profile to the host context.

Returns:
    List of dictionaries, each containing:
    - "ref": Package reference (string)
    - "licenses": List of license strings (always a list, empty if no license specified)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
work_dirYesWorking directory where the command should be executed. This is the base directory from which all paths are resolved. Always required.
pathNoPath to the folder containing the recipe of the project or to a recipe file conanfile.txt/.py. Optional if requires is provided.
requiresNoList of package references to check licenses for (e.g., ['zlib/1.2.11', 'fmt/10.0.0']). Each reference will be passed as a --requires flag. Optional if path is provided.
remoteNoRemote name. Omit to search in all remotes.
build_profileNoProfile to the build context.
host_profileNoProfile to the host context.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries full burden. It discloses that only host context packages are analyzed, that licenses are always returned as a list, and that the tool uses 'conan graph info'. It does not mention side effects, but as a read-only query tool, this is acceptable.

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 headings, examples, and a parameter list. While slightly verbose in places (e.g., repeating 'collect license information'), the information density is high and every sentence contributes to clarity.

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 (6 parameters with mutual exclusivity), the description is comprehensive: it explains usage, provides examples, and details the return value structure. The output schema is described textually, fulfilling completeness for an agent to invoke the tool correctly.

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?

Despite 100% schema coverage, the description adds significant value by explaining parameter relationships (e.g., mutual exclusivity of 'path' and 'requires'), clarifying relative path resolution, and providing concrete examples. The description goes well beyond the schema's attribute descriptions.

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 collects license information for Conan dependencies, specifies the use of 'conan graph info', and distinguishes by noting only host context packages are analyzed. It provides specific use cases like 'Search for licenses of the project' and 'Extract license information', leaving no ambiguity about its purpose.

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 explicitly states when to use the tool ('Use this tool when you need to: ...') and provides multiple examples. While it doesn't explicitly mention when not to use it or compare to siblings, the context is clear enough for an agent to infer appropriate usage.

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/conan-io/conan-mcp'

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