Skip to main content
Glama

Role interface

ansible_role_interface
Read-onlyIdempotent

Inspect an Ansible role's interface: argument specs, options, defaults, undocumented defaults, dependencies, vars, and galaxy_info for local or collection roles.

Instructions

A role's interface: argument_specs entry points and options (no_log honoured), defaults with redacted values, which defaults are undocumented, dependencies, vars names and galaxy_info. Works for local roles (roles_path, dir/roles, or a path) and collection roles (ns.collection.role).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoAnsible project directory. Default: ANSIBLE_MCP_DIR, else the server's working directory.
roleYesLocal role name, path relative to dir, or ns.collection.role
entry_pointNoOnly this entry point (default: all)
description_charsNoTruncate each description to this many characters; 0 = no limit (default 160)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so safety is covered. The description goes beyond that by disclosing output-handling behavior the agent cannot infer: no_log is honoured, default values are redacted, and undocumented defaults are flagged — genuinely useful context for interpreting results.

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?

Two sentences, no filler, with the output inventory front-loaded. The first sentence is dense with a long comma-separated list, but every item is substantive content rather than padding.

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?

There is no output schema, so the description must carry the return-value burden — and it does, enumerating the sections returned and noting redaction. Combined with read-only annotations and covered input forms, an agent has enough to call and interpret this correctly; only the absence of explicit sibling routing keeps it from a 5.

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?

Schema coverage is 100%, so the schema already documents all four parameters, giving a baseline of 3. The description adds resolution semantics not present in the schema, notably the roles_path lookup and the dir/roles convention, which clarifies how the required 'role' argument is resolved.

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 names the specific resource (a role's interface) and enumerates exactly what it surfaces: argument_specs entry points/options, defaults (redacted), undocumented defaults, dependencies, vars names, galaxy_info. That is far more precise than a tautology, and the resource is clearly distinct from siblings like ansible_module_doc or ansible_playbook_structure, though no sibling is named explicitly.

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?

It states the accepted role forms ('local roles (roles_path, dir/roles, or a path) and collection roles (ns.collection.role)'), which tells the agent what inputs are valid but not when to prefer this tool over alternatives such as ansible_module_doc or ansible_project_info. Usage is implied rather than routed.

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