Skip to main content
Glama

ensure_collection

Idempotent

Install an Ansible collection for the current session, pinning the resolved version. Returns whether newly installed or already present.

Instructions

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 On failure returns {"error": str}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
versionNoOptional version (e.g. '4.1.0'). If omitted, installs latest and pins the resolved version.
collection_namespaceYesCollection namespace (e.g. 'netbox.netbox')

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations indicate idempotentHint=true and destructiveHint=false. The description adds context: version pinning, skip vs reinstall behavior, and detailed return dict with status and error case. This extends beyond the annotations without contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose, followed by behavioral details in order, then return value format. Every sentence adds value with no redundancy. It is appropriately concise for the complexity.

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

Completeness5/5

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

Given the complete input schema, output schema described in detail, and annotations, the description covers all essential aspects: purpose, behavior, parameter effects, return values, and error handling. No gaps remain.

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?

Input schema already covers both parameters with descriptions (100% coverage). The description adds meaning by explaining that omitting version installs and pins latest, and that requesting a different version triggers reinstall. This provides useful behavioral context.

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?

The description clearly states the tool installs a collection to a temporary directory for the session. It uses specific verb (install) and resource (collection), and distinguishes from sibling tools like search_collections or get_collection_docs.

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 description explains the behavior (installs once, pins version, skips if same version unless different version requested) but does not explicitly state when to use this tool versus alternatives. There is no mention of exclusions or when not to use it.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leogallego/ansible-know-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server