Skip to main content
Glama

Package For Lola

package_for_lola
DestructiveIdempotent

Wraps generated Ansible collection skills into a Lola-compatible module directory, copying skill folders and writing marketplace metadata for lola mod add.

Instructions

Wrap already-generated skills into a Lola-compatible module directory.

.. deprecated:: Prefer :func:package_as_plugin (Agent Plugins). Kept for one release cycle for backward compatibility.

Does not change generate_* output layout. Copies skills/{collection-kebab}/{skill}/ into {output_dir}/{module}/skills/{skill}/ for marketplace / lola mod add use. Replaces any existing skills/ tree under the target module directory (destructive but idempotent).

Returns: {"collection", "module_name", "module_dir", "skill_count", "skills", "market_yml"} or {"error": str} on failure.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "collection": "<collection>",
      "output_dir": "<output_dir>"
    },
    "name": "package_for_lola"
  }
}

Input Schema

NameRequiredDescriptionDefault
collectionYesCollection namespace whose generated skills to wrap (e.g. 'netbox.netbox').
output_dirYesParent directory where the Lola module directory will be created (e.g. '.' or '/tmp/lola-modules').
source_dirNoOptional skills root to read from. Defaults to ANSIBLE_KNOW_SKILLS_PATH or SKILLS_DIR (same roots as list_skills).
module_nameNoOptional Lola module directory name. Defaults to 'ansible-{collection-kebab}' (e.g. 'ansible-netbox-netbox').
write_market_ymlNoWhen true (default), write lola-market.yml with collection metadata beside the module skills/ tree.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false; the description adds specificity by naming exactly what is destroyed — "Replaces any existing ``skills/`` tree under the target module directory" — which the boolean flags cannot convey. It does not address permissions or failure modes beyond the return-value note, so it is strong but not exhaustive.

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?

Front-loaded with the deprecation notice, which is the single most decision-relevant fact, followed by scope, mechanics, and return shape. Slightly noisy with reStructuredText markup (double backticks, ``Returns:`` block) that could be plainer, but every sentence carries information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Covers prerequisites, source-root defaults, the destructive replacement behavior, and the deprecation route, which is complete for a 5-parameter packaging tool with full schema coverage. The explicit return-shape listing is somewhat redundant given a real output schema exists, but it is not harmful.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds genuine meaning: the copy-path template explains how `collection`, `output_dir`, and `module_name` combine, and the marketplace/`lola mod add` framing clarifies why `write_market_yml` matters. It goes beyond restating the schema defaults.

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 and resource — wrapping already-generated skills into a Lola-compatible module directory — and explicitly bounds the scope with "Does not change ``generate_*`` output layout," which separates it from the generate_* siblings. The copy path (`skills/{collection-kebab}/{skill}/` → `{output_dir}/{module}/skills/{skill}/`) makes the operation unambiguous to an agent.

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?

Names the preferred alternative explicitly ("Prefer :func:`package_as_plugin`") and gives the reason and the condition (backward compatibility, one release cycle). It also states the prerequisite that skills must already be generated, so an agent knows this is a post-generation packaging step rather than a generator.

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