Skip to main content
Glama

tf_module_interface

Read-onlyIdempotent

Inspect a Terraform module's variables, outputs, and calls from the current working directory, resolving local or installed modules by address without running init.

Instructions

Variables (exact type expression, required/optional, default, sensitive/nullable/ephemeral, validation count), outputs and module calls of a module in THIS working directory: the root, a local module directory, or an installed module by address (module.network, resolved through .terraform/modules/modules.json, so downloaded registry/git modules work). Module calls are checked against what is installed. For public registry modules you have not installed, use the official terraform MCP server.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoTerraform root module directory (need not be initialized for the root or a local path). Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory.
moduleNoModule to describe: omitted = the root; a module address like 'module.network' or 'module.a.module.b' (resolved through .terraform/modules/modules.json, so downloaded registry/git modules work); or a directory path relative to dir
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.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnlyHint, idempotentHint, destructiveHint false, openWorldHint false), so the bar is lower. The description still adds useful mechanics: address resolution runs through .terraform/modules/modules.json (so downloaded registry/git modules resolve), and module calls are validated against what is installed. It does not describe failure behavior when a module is missing.

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 highest-value content (what gets returned), and the second sentence carries the exclusion. The first sentence is dense and parenthetical-heavy, but every clause adds a distinct piece of information rather than filler.

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 convey return content, and it does: it lists the variable attributes surfaced and the presence of outputs and module calls. Combined with the read-only annotations and 100%-covered schema, an agent has enough to call it correctly; only error/missing-module behavior is left implicit.

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 description coverage is 100%, so all three parameters (dir, module, description_chars) are already documented in the schema. The description restates the module address forms that the schema already covers, adding essentially no syntax or default detail beyond it. Baseline 3 applies when the schema does the heavy lifting.

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 resource (a module) and enumerates exactly what it returns: variables (with type expression, required/optional, default, sensitive/nullable/ephemeral, validation count), outputs and module calls. The 'in THIS working directory' scope is a real differentiator, though no sibling tool (e.g. tf_get_schema or tf_check_arguments) is named to sharpen the boundary.

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

Usage Guidelines5/5

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

It states the when (root, local module directory, or installed module address resolved via modules.json) and the when-not with an explicit alternative: 'For public registry modules you have not installed, use the official terraform MCP server.' That is a complete routing rule for an agent deciding between tools.

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