Skip to main content
Glama

Package As Plugin

package_as_plugin
DestructiveIdempotent

Wrap generated Ansible skills into an Agent Plugins directory, writing plugin.json and optional mcp.json or tarball 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

A4.1/5.0
Behavior4/5

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

Annotations already declare destructive=true and idempotent=true, but the description earns credit for naming precisely what gets destroyed ("Replaces any existing ``skills/`` tree under the target plugin directory") and disclosing the write_tarball→write_plugin_json dependency. It also documents the files created (plugin.json, mcp.json, tar.gz). The remaining gap is that it does not warn about pre-existing non-skills content or failure modes beyond returning {"error": str}.

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 core action is front-loaded in the first sentence, followed by layout detail and the return shape. The path-pattern sentence is dense but informative; nothing is redundant filler. Slightly verbose in its wrapping of paths, but each clause carries operational meaning.

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 destructive nine-parameter packaging tool, the description covers prerequisites, on-disk effects, overwrite behavior, and outputs. An output schema exists, so the redundant return-value enumeration is harmless rather than necessary. The main omission is any routing guidance toward the alternative packaging destination.

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 description coverage is 100%, so the schema already documents all nine parameters in detail, including defaults and validation rules. The description adds only high-level framing (plugin.json written, mcp.json optional per the spec) rather than new semantics for individual arguments. Baseline 3 is appropriate when the schema carries the parameter burden.

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 concrete verb and resource — wrap already-generated skills into an Agent Plugins directory — and goes further by spelling out the exact source and destination path pattern. It also explicitly carves itself out from the generate_* family ("Does not change ``generate_*`` output layout"), so an agent can tell it apart from the skill-generation siblings without reading schemas.

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 phrase "already-generated skills" establishes the prerequisite implicitly: skill generation must happen first. The note about not altering generate_* layout clarifies sequencing relative to those siblings. However, there is no explicit statement of when to prefer this over the adjacent packaging sibling, nor any exclusion beyond the generate_* note.

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