Skip to main content
Glama

Package As Plugin

package_as_plugin
DestructiveIdempotent

Wrap generated Ansible collection skills into an Agent Plugins directory, writing plugin.json, optional mcp.json, and a .tar.gz archive for distribution.

Instructions

Wrap already-generated skills into an Agent Plugins directory.

Does not change generate_* output layout. Copies skills/{collection-kebab}/{skill}/ into {output_dir}/{plugin}/skills/{skill}/ and writes plugin.json (and optionally mcp.json + .tar.gz) per the Agent Plugins specification. Replaces any existing skills/ tree under the target plugin directory (destructive but idempotent).

Returns: {"collection", "plugin_name", "plugin_dir", "skill_count", "skills", "plugin_json", "mcp_json", "archive"} 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_as_plugin"
  }
}

Input Schema

NameRequiredDescriptionDefault
mcp_urlNoAbsolute MCP endpoint URL when mcp_transport is 'streamable-http' (e.g. 'https://aap.example.com/mcp/skills/'). Ignored for stdio.
collectionYesCollection namespace whose generated skills to wrap (e.g. 'netbox.netbox').
output_dirYesParent directory where the Agent Plugin directory will be created (e.g. '.' or '/tmp/agent-plugins').
source_dirNoOptional skills root to read from. Defaults to ANSIBLE_KNOW_SKILLS_PATH or SKILLS_DIR (same roots as list_skills).
plugin_nameNoOptional Agent Plugins manifest name / directory name. Defaults to 'ansible-{collection-kebab}-agentplugin' (e.g. 'ansible-netbox-netbox-agentplugin'). Must satisfy Agent Plugins §5.5 (1-64 chars, [a-z0-9.-]).
mcp_transportNoMCP transport for mcp.json when include_mcp_config is true: 'stdio' (default, uvx ansible-know-mcp) or 'streamable-http' (requires mcp_url for an AAP-hosted know-mcp endpoint).stdio
write_tarballNoWhen true (default), also write {plugin_name}-{version}.tar.gz beside the plugin directory (Pulp/AAP-friendly artifact). Requires write_plugin_json=True.
write_plugin_jsonNoWhen true (default), write plugin.json with Agent Plugins v1.0.0 manifest fields. Required when write_tarball is true.
include_mcp_configNoWhen true (default), write mcp.json for know-mcp (see mcp_transport).

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description goes beyond them by naming exactly what is destroyed: the existing skills/ tree under the target plugin directory, and by spelling out the copy source/destination layout. It also discloses the manifest and optional archive side effects, though it does not mention permission requirements or failure modes beyond the return shape.

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 purpose and the destructive/idempotent caveat are front-loaded, followed by the path layout and the return shape. The backticked path notation is dense but earns its place; the returns line is arguably redundant given an output schema exists.

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?

For a 9-parameter destructive packaging tool with full schema coverage and an output schema, the description covers purpose, side effects, and file layout adequately. The notable omission is disambiguation from package_for_lola, which an agent would need in order to choose correctly.

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

Parameters3/5

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

Schema coverage is 100%, so all nine parameters are already documented in structured form, setting the baseline at 3. The description adds only light framing — that mcp.json and the .tar.gz are optional outputs — which maps to parameters the schema already explains in more detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource: wrapping already-generated skills into an Agent Plugins directory, and it explicitly says it does not alter generate_* output layout. That separates it from the generate_* siblings, but it never mentions package_for_lola, the other packaging sibling, so an agent must still guess between the two packaging tools.

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?

'Wrap already-generated skills' states the prerequisite clearly (generate_* must run first), and 'Does not change generate_* output layout' clarifies the relationship to that family. There are no explicit exclusions or routing rules versus package_for_lola, which is the main remaining gap.

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