Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ANSIBLE_KNOWLEDGE_SKILLS_DIRNoWhere to write generated skills./skills/
ANSIBLE_KNOWLEDGE_DOC_SOURCESNoJSON dict of doc manifest sourcesBuilt-in ansible-core source

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

Ansible module, role, and plugin discovery, documentation, and skill generation. Workflow: (1) search_collections to discover collections on Galaxy, (2) ensure_collection to install one for this session, (3) search_modules/search_plugins/get_collection_manifest to find content, (4) get_module_doc, get_role_doc, or get_plugin_doc for structured docs, (5) for standalone/legacy Galaxy roles, use search_standalone_roles then get_standalone_role_doc with a 2-part namespace.role identifier, (6) search_docs for conceptual guides with the matching source (ansible-core HOWTO, ansible-lint rules, aap-2.x product, cop-good-practices for CoP good practices / 'best practices' questions), then fetch_doc to retrieve full content (docs.redhat.com fetches use a public-HTML fallback when the deprecated nested MCP client is rejected with HTTP 401; for full fidelity connect the GA Red Hat Documentation MCP server https://docs-mcp.api.redhat.com/mcp directly in your client — that does not authenticate ansible-know's nested client), (7) generate_skill, generate_role_skill, or generate_plugin_skill for skill packages. Resources: server://version for version and upgrade status, galaxy://installed for session collections, docs://sources for configured doc sources, skills://list for generated skills.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
logging
{}
prompts
{
  "listChanged": true
}
resources
{
  "subscribe": false,
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
search_modulesA

Find Ansible modules by keyword in name or description. Returns up to 50 matches as {fqcn: short_description}.

Multi-word queries use AND semantics (every word must match somewhere in the name or description); results are ranked deterministically with stronger name matches first.

Returns: {"module.fqcn": "short description", ...} or {"error": str} on failure.

search_pluginsA

Find Ansible plugins by keyword. Returns up to 50 matches as {fqcn: short_description}.

Multi-word queries use AND semantics (every word must match somewhere in the name or description), same as search_modules.

Plugin types: lookup, filter, test, connection, become, strategy, callback, inventory, cache, cliconf, httpapi, netconf, shell, vars. On failure returns {"error": str}.

get_module_docA

Get full structured documentation for one module.

Returns: module_name, short_description, params (list with name/type/required/default/choices/description/aliases), examples (raw YAML), is_api_module, doc_source ('local' or 'galaxy'). When doc_source is 'galaxy', also includes doc_version and optionally doc_warning. Falls back to Galaxy if collection is not installed locally. On failure returns {"error": str}.

get_role_docB

Get full structured documentation for one role.

Returns: role_name, content_type ('role'), short_description, doc_source ('local', 'galaxy_readme', or 'unavailable'), entry_points (dict of entry point names to {description, options}), dependencies (list), examples (str). When doc_source is 'galaxy_readme', also includes doc_version and doc_warning. Falls back to Galaxy README parsing if local ansible-doc returns empty. On validation failure returns {"error": str}.

get_standalone_role_docA

Get standalone role documentation for a 2-part namespace.role identifier.

Use this for standalone roles discovered with search_standalone_roles. This tool does not replace get_role_doc for collection roles.

get_plugin_docA

Get full structured documentation for one plugin.

Returns: plugin_name, plugin_type, short_description, params, examples, doc_source ('local' or 'galaxy'). Falls back to Galaxy if collection is not installed locally. On failure returns {"error": str}.

search_docsA

Search documentation manifests for conceptual guides.

Returns up to 20 matching entries with title, summary, topic, audience, lines, source, and raw URL. On failure returns {"error": str}.

Multi-word queries first match entries containing every word (AND); if nothing matches exactly, a relaxed pass returns ranked partial matches (ranked by how many words hit the title, summary, and topics) instead of returning empty (#291).

Choose source by corpus:

  • ansible-core (or omit): official HOWTO — playbooks, vault, inventory syntax

  • ansible-lint: rules and profiles

  • ansible-navigator / ansible-builder / ansible-creator / molecule: matching source

  • aap-2.5 / aap-2.6 / aap-2.7: AAP product manuals

  • cop-good-practices: CoP opinionated practices (role design, naming, CaC, Git, testing process). Users often say "best practices"; do not invent cop-best-practices. Unfiltered search fills the 20-hit window with official + AAP first; CoP may be absent — retry with source='cop-good-practices' for CoP-shaped questions.

fetch_docA

Fetch a docs page as clean Markdown.

Returns documentation content ready for LLM consumption. Use search_docs to discover relevant page URLs. Accepts docs.ansible.com, docs.redhat.com, or CoP good-practices raw GitHub README.adoc URLs from search_docs hits (not arbitrary raw.githubusercontent.com hosts).

docs.redhat.com URLs are fetched over unauthenticated public HTTP (HTML → markdown, soft-404 detection, /html/ rewriting). When public retrieval fails (bot protection, HTTP errors, not-found pages), the error explains how to connect the GA Red Hat Documentation MCP server (https://docs-mcp.api.redhat.com/mcp) directly in your AI client. search_docs with the aap-2.5/aap-2.6/aap-2.7 sources uses shipped local manifests and is unaffected.

search_collectionsA

Search Ansible Galaxy for collections by keyword.

Returns non-deprecated collections ranked by download count. Use this to discover which collection provides modules for a specific platform or use case.

After finding a collection, use ensure_collection() to install it, then get_module_doc() or get_collection_manifest() to explore its modules.

Returns: {"query": str, "count": int, "collections": [{"namespace": str, "description": str, "tags": [str], "latest_version": str, "module_count": int, "download_count": int, "deprecated": bool, "signed": bool}, ...]} On failure returns {"error": str}.

search_standalone_rolesA

Search Galaxy standalone/legacy roles by keyword.

This targets standalone (2-part) roles. Collection roles use search_collections/get_role_doc. tags accepts a single Galaxy tag; if comma-separated values are provided, only the first segment is sent.

If public Galaxy is disabled and no configured server supports v1 role endpoints, expect a v1-unsupported error.

get_collection_manifestA

Get a lightweight collection overview: module/role/plugin names with one-line descriptions.

Prefer this over get_collection_docs when exploring a collection — it returns a compact summary suitable for deciding which modules to drill into with get_module_doc.

Computes a fresh overview without reading or writing project MANIFEST.json files (metadata extraction only, no skill generation or cache persistence). Explicit skill-generation tools still persist their own manifests. On failure returns {"error": str}.

Module docs are fetched in batched ansible-doc calls. If the entire batch fails hard, the overview contains zero module entries (roles/plugins from list discovery are still included when present).

get_collection_docsA

Get full parameter-level documentation for every module in a collection from Galaxy.

WARNING: output can be very large (100 KB+) for collections with many modules. Use get_collection_manifest first for a compact overview, then get_module_doc for the specific modules you need. Reserve this tool for batch operations that genuinely need all parameter details at once (e.g. skill generation).

Returns all module docs in a single API call without installing the collection. Result shape: {"modules": {fqcn: {module_name, short_description, params, examples, is_api_module}, ...}, "doc_source": "galaxy", "doc_version": str}. On failure returns {"error": str}.

ensure_collectionA

Install a collection to a temporary directory for this session.

Installs once and pins the resolved version. Subsequent calls with the same namespace skip unless a different version is explicitly requested. If a different version is requested than currently installed, the collection will be reinstalled.

Returns dict with keys:

  • namespace: str — the collection namespace

  • version: str — the installed/active version (always set)

  • status: 'installed' (freshly installed or upgraded) or 'already_installed' (same version already present, no action taken)

  • message: str — human-readable summary including the active version

  • handle: str — opaque session handle; pass it as collection_handle to subsequent tool calls on remote connections On failure returns {"error": str}.

Pass collection_handle when re-invoking ensure_collection on a remote connection with a handle obtained from a prior call (e.g. to install an additional collection into the same session). Omit it on local stdio, or on remote when you want a brand-new session handle minted.

list_skillsA

List all available generated skills. Returns name, description, path for each.

Searches ANSIBLE_KNOW_SKILLS_PATH (colon-separated) when set, otherwise the single SKILLS_DIR. Duplicate names keep the first path's entry.

Returns: [{"name": str, "description": str, "path": str}, ...] or {"error": str} on failure.

get_skillA

Read a specific skill's SKILL.md content by name.

Searches ANSIBLE_KNOW_SKILLS_PATH (colon-separated) when set, otherwise the single SKILLS_DIR. First match wins.

Returns: SKILL.md content as str, or {"error": str} on failure/not found.

generate_skillA

Generate a skill package for one module.

Writes SKILL.md + scripts + playbook to disk. Returns the SKILL.md content as str, or {"error": str} on failure.

generate_role_skillA

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.

generate_plugin_skillA

Generate a skill package for one plugin.

Writes SKILL.md to disk (no scripts/ or assets/). Returns the SKILL.md content as str, or {"error": str} on failure.

generate_collection_skillsA

Batch generate skills for an entire collection.

Generates/updates the collection MANIFEST.json as a byproduct. Updates AGENTS.md in the project root with a managed section listing available collections for cross-agent discovery. Returns {"succeeded": int, "failed": int, "total": int, "manifest": dict, "collection_skill": str}, or {"error": str} on failure.

Module/plugin docs use batched ansible-doc calls. Names missing from a batch (or a hard batch failure) are counted in failed; partial batch success still writes skills for resolved names.

package_as_pluginA

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.

package_for_lolaA

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.

clear_cacheA

Clear server caches.

Clears Galaxy version/docs-blob caches, standalone-role v1 caches, collection-search and collection-detail caches, doc manifest/page caches, or both. Useful when cached data becomes stale during long-running sessions.

Prompts

Interactive templates invoked by user choice

NameDescription
review_playbookReview an Ansible playbook against module documentation and best practices.
explain_moduleGet a detailed explanation of an Ansible module with usage examples.
explain_pluginGet a detailed explanation of an Ansible plugin with usage examples.
generate_roleGenerate an Ansible role skeleton using specified modules.
find_collectionGuide the agent through discovering, installing, and exploring a collection.

Resources

Contextual data attached and managed by the client

NameDescription
Available SkillsList all generated skill packages
Installed CollectionsList the local default workspace's collections; HTTP reads return an empty object
Server VersionInstalled and latest version info with upgrade status
Galaxy ServersList configured Galaxy servers from ansible.cfg. Shows auth type (token/basic/none) for debugging; credentials are never exposed.
Documentation SourcesList configured documentation manifest sources

TDQS

A3.9/5.0

Scored across 22 tools

Disambiguation4/5

Tools are grouped cleanly by resource type (modules, plugins, roles, collections, docs, skills) and descriptions explicitly clarify boundaries, e.g. get_standalone_role_doc vs get_role_doc and get_collection_manifest vs get_collection_docs. The main confusion risk is package_as_plugin vs the deprecated package_for_lola, and the search_* vs get_* pairs, but descriptions largely resolve these.

Naming Consistency5/5

Every tool uses a consistent snake_case verb_noun pattern (search_modules, get_module_doc, generate_skill, ensure_collection, clear_cache). Minor variants like package_as_plugin/package_for_lola still follow the same readable convention.

Tool Count4/5

22 tools is on the heavy side, but the domain legitimately spans modules, plugins, roles, standalone roles, collections, docs, skill generation, and packaging, so most tools earn their place. One deprecated packaging tool (package_for_lola) is dead weight that could be removed.

Completeness4/5

The surface covers discovery, documentation retrieval, skill generation, packaging, collection installation, and cache clearing—a full knowledge/lifecycle workflow. Minor gaps exist, such as no skill deletion/update or cache inspection, but core workflows are complete.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues