Skip to main content
Glama

Get Module Doc

get_module_doc
Read-only

Retrieve complete structured documentation for a single Ansible module, including parameters, examples, and source details, with automatic Galaxy fallback when the collection is not installed locally.

Instructions

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}.

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": {
      "module_name": "<module_name>"
    },
    "name": "get_module_doc"
  }
}

Input Schema

NameRequiredDescriptionDefault
module_nameYesFully-qualified collection name (e.g. 'ansible.builtin.copy')
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. First observedv0.7.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, and the description adds genuine context beyond them: it documents the automatic fallback to Galaxy when a collection is not installed locally, the conditional doc_version/doc_warning fields, and the {"error": str} shape on failure. Missing only things like whether failures are silent or thrown, but the fallback behavior is a valuable disclosure.

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?

It is short, front-loaded with the purpose, and organized into a compact returns block. The return-field enumeration partially duplicates the published output schema, which is mild redundancy, but no sentence is filler.

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 two-parameter read tool with full schema coverage and an output schema, this covers purpose, fallback behavior, conditional fields, and error shape. The only gap is routing guidance to sibling doc tools, which the definition leaves out.

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%, with both module_name (fully-qualified name example) and collection_handle (session handle, required on remote) already documented in the schema. The description adds no further parameter meaning, so the baseline 3 for a fully-described schema applies.

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 and resource: 'Get full structured documentation for one module.' That clearly separates it from documentation-fetching siblings in spirit (plugin/role docs), though it never names those siblings explicitly, so the module-vs-plugin distinction must be inferred from the tool name alone.

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?

Usage is implied rather than stated: you call this when you already know the fully-qualified module name and need its full docs. There is no explicit when-not guidance or pointer to get_plugin_doc / get_role_doc / search_modules as alternatives, and the local-vs-remote distinction is only conveyed indirectly through the collection_handle parameter.

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