Skip to main content
Glama

Get role input/output contract

get_role_spec

Get the full input/output contract of an Ansible role to discover exact fact names and argument specifications before generating a playbook.

Instructions

Get the full input/output contract for a role. Returns argument_specs.yml (inputs) and output_specs.yml (outputs) with a documentation quality grade. Call this for EACH role before generating a playbook to discover the exact fact names the role sets.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fqcnYesFully qualified role name (e.g., 'redhat.rhel_system_roles.firewall')
Behavior3/5

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

With no annotations, the description carries the full burden. It describes the return values (argument_specs.yml, output_specs.yml, grade) but does not disclose any behavioral traits like potential side effects, required permissions, or rate limits. The description is informative but not exhaustive.

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?

Two sentences with zero waste. Every sentence adds value: first explains what the tool does, second gives a concrete usage example.

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 simple schema (one parameter) and straightforward output (two files and a grade), the description is complete. It covers the tool's purpose, when to use it, and what it returns. No missing information.

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% with one required parameter fqcn. The description reiterates the parameter's purpose ('Fully qualified role name') but adds the context of calling it per role, which is already implied. The baseline of 3 is appropriate as the schema does the heavy lifting.

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 retrieves the full input/output contract for a role, specifying the exact files (argument_specs.yml and output_specs.yml) and mentions a documentation quality grade. It distinguishes from sibling tools like get_module_spec which handles module specs.

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

Usage Guidelines4/5

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

Explicit guidance is provided: 'Call this for EACH role before generating a playbook to discover the exact fact names the role sets.' This tells when and why to use it, though it doesn't explicitly mention when not to use it or alternatives.

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/fabiendupont/mcp-ansible-galaxy'

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