Skip to main content
Glama

Terraform modules summary

tf_modules_summary
Read-only

Lists modules used by an initialized Terraform or OpenTofu project, returning each module's key, source, and version from .terraform/modules/modules.json. Run init first.

Instructions

List the modules used by an initialized Terraform/OpenTofu project (key, source, version). Reads .terraform/modules/modules.json — run init first.

Input Schema

NameRequiredDescriptionDefault
cwdYesTerraform project directory

Output Schema

NameRequiredDescriptionDefault
countYes
modulesYes
retainedNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A4.3/5.0
Behavior4/5

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

Discloses the underlying data source (.terraform/modules/modules.json) and the init prerequisite, which is meaningful context beyond the readOnlyHint annotation. Return shape is covered by the output schema, so remaining gaps are minor.

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 tight sentences, zero filler, with the listing purpose front-loaded and the prerequisite trailing as supporting detail.

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?

Everything needed to call it correctly is present: purpose, prerequisite, data source, and a fully covered parameter with an output schema for return values.

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?

With 100% schema coverage the single cwd parameter is already documented as the Terraform project directory. The description's mention of an 'initialized' project adds only slight nuance, so baseline 3 applies.

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?

States a specific verb (List) and resource (modules) plus the exact fields returned (key, source, version) and the scope (an initialized Terraform/OpenTofu project). An agent can readily distinguish it from siblings like tf_state_list or tf_providers.

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?

Provides a concrete precondition — the project must be initialized and init must have been run — before the tool will work. It does not, however, explicitly compare against alternatives or state when not to use it.

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