Skip to main content
Glama

Search Modules

search_modules
Read-only

Find Ansible modules by keyword matching names or descriptions, returning ranked results with short descriptions. Filter by collection namespace to narrow discovery.

Instructions

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.

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": {
      "keyword": "<keyword>"
    },
    "name": "search_modules"
  }
}

Input Schema

NameRequiredDescriptionDefault
keywordYesSearch term (multi-word queries match entries containing every word, e.g. 'cisco vlan'). If you get no results, retry with fewer words.
namespaceNoOptional collection namespace filter (e.g. 'community.docker')
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.13.0
    • changedInput schema / properties / keyword / description
      Previous value: -"Search term to match against module names and descriptions"New value: +"Search term (multi-word queries match entries containing every word, e.g. 'cisco vlan'). If you get no results, retry with fewer words."
  2. 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."
      +}
  3. 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=false, so safety is covered; the description adds real value beyond that with a 50-result cap, AND semantics for multi-word queries, deterministic ranking with name matches weighted first, and the error return shape. It stops just short of describing pagination or truncation behavior when more than 50 matches exist.

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?

Front-loaded with the core purpose in the first sentence, then the ranking/return details in compact follow-ups. The 'Returns' line duplicates information now also present in the output schema, which is minor waste but no filler prose.

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 read-only keyword search with full schema coverage and an output schema, the definition covers purpose, matching semantics, result cap, ranking, and failure shape. Only edge behavior such as result truncation beyond 50 entries and the remote-handle requirement is left to the schema.

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 coverage is 100% and each parameter is already described, so the baseline is 3. The description reinforces query semantics (AND matching, ranking) but adds little about the namespace or collection_handle parameters, which the schema already explains.

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: 'Find Ansible modules by keyword in name or description.' The resource (modules) is clearly distinguishable from sibling searches like search_collections, search_plugins, and search_docs, though the description never explicitly names those alternatives.

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 context is implicit: search here for a module, presumably followed by get_module_doc. There is no explicit guidance on when to prefer this over search_docs or search_plugins, and no exclusions. The useful retry advice ('retry with fewer words') lives in the schema rather than the description.

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