Skip to main content
Glama

Generate Role Skill

generate_role_skill
Idempotent

Generate a role-specific skill package with SKILL.md and assets/playbook.yml written to disk, returning the SKILL.md content or an error on failure.

Instructions

Generate a skill package for one role.

Writes SKILL.md + assets/playbook.yml to disk (no scripts/). Returns the SKILL.md content as str, 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": {
      "role_name": "<role_name>"
    },
    "name": "generate_role_skill"
  }
}

Input Schema

NameRequiredDescriptionDefault
role_nameYesFully-qualified role name (e.g. 'fedora.linux_system_roles.timesync')
install_toNoOptional absolute path to install the skill to. Defaults to the project skills/ directory (via ANSIBLE_KNOW_SKILLS_DIR, or ANSIBLE_KNOW_PROJECT_DIR/CLAUDE_PROJECT_DIR/cwd + /skills).
collection_handleNoSession handle returned by ensure_collection. Omit on local stdio; required on remote.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • addedInput schema / properties / collection_handle
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Session handle returned by ensure_collection. Omit on local stdio; required on remote."
      +}
  2. Changed1 schema field changedv0.8.0
    • changedInput schema / properties / install_to / description
      Previous value: -"Optional absolute path to install the skill to"New value: +"Optional absolute path to install the skill to. Defaults to the project skills/ directory (via ANSIBLE_KNOW_SKILLS_DIR, or ANSIBLE_KNOW_PROJECT_DIR/CLAUDE_PROJECT_DIR/cwd + /skills)."
  3. First observedv0.7.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations only supply openWorldHint and idempotentHint, so the description usefully adds that files are written to disk and exactly which artifacts are produced (SKILL.md + assets/playbook.yml, deliberately no scripts/). It still leaves the overwrite semantics of an existing skill package and the remote-handle requirement implicit.

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?

Three short lines, front-loaded with the purpose before the side effects and return contract. The return-value sentence partly duplicates the existing output schema, which is the only mildly redundant element.

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?

Given a fully documented schema and an output schema, the description covers the remaining gap an agent needs: that this is a file-writing operation with a known artifact set. It is nearly complete, missing only sibling routing guidance and remote collection-handle prerequisites.

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 explains role_name, install_to, and collection_handle in detail. The description contributes only the 'one role' framing, which maps to role_name, and adds no syntax or format detail beyond the schema baseline.

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?

States a specific verb and resource ('generate a skill package') plus an explicit scope ('for one role'), which implicitly separates it from collection-level siblings like generate_collection_skills. It never names the near neighbors generate_skill or generate_plugin_skill, so the differentiation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for one role' implies when this tool is appropriate (single-role packaging), but there is no explicit when-to-use, when-not-to-use, or prerequisite guidance. Nothing tells the agent to call ensure_collection first when operating remotely, despite collection_handle existing in the schema.

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