Skip to main content
Glama
vsl8
by vsl8

ansible-task

Execute Ansible ad-hoc commands on inventory hosts, specifying module and arguments, with support for privilege escalation, check mode, and diff output.

Instructions

Run an ad-hoc Ansible task using the ansible CLI.

Args: host_pattern: Inventory host pattern to target (e.g., 'all' or 'web') module: Module name (e.g., 'ping', 'shell') args: Module arguments, either dict or string inventory: Inventory path or host list become: Use privilege escalation become_user: Target user when using become check: Check mode diff: Show diffs cwd: Working directory verbose: Verbosity level 1-4 connection: Connection type (e.g., 'local', 'ssh'). Defaults to 'local' when targeting localhost. Returns: A dict with keys: ok (bool), rc, stdout, stderr, command

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cwdNo
envNo
argsNo
diffNo
checkNo
becomeNo
moduleYes
verboseNo
inventoryNo
connectionNo
become_userNo
host_patternYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior2/5

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

With no annotations, the description must fully disclose behavior. It mentions parameters and return value but omits critical details: potential destructiveness, authentication needs, error handling, or that it executes on remote targets. The return dict lacks descriptions of each key.

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?

The description is front-loaded with the purpose and organized into clear sections (Args, Returns). It is reasonably concise given the parameter count, though some schema information (e.g., required fields) is repeated, which could be trimmed.

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

Completeness3/5

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

Given the tool's complexity (12 parameters, no annotations, no output schema beyond text), the description lists all inputs and return keys but misses context like prerequisites (ansible installed), remote execution implications, and error behavior. It is functional but not fully self-contained.

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?

The description provides inline explanations for all 12 parameters (e.g., 'host_pattern: Inventory host pattern to target'), which adds meaning beyond the schema's bare property names. However, explanations are minimal: 'Args: Module arguments, either dict or string' does not clarify accepted structures or examples.

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 clearly states 'Run an ad-hoc Ansible task using the ansible CLI,' specifying the verb and resource. It implies distinction from playbook-running siblings like ansible-playbook, but does not explicitly differentiate from other ad-hoc commands such as ansible-ping.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives (e.g., ansible-playbook, ansible-remote-command). It lacks any when/when-not context or prerequisites, leaving the agent to infer usage from the name alone.

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/vsl8/ansible-mcp-server'

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