Skip to main content
Glama

Terraform validate summary

tf_validate_summary
Read-only

Validates Terraform or OpenTofu configurations and returns a compact pass/fail summary with diagnostics, helping identify configuration issues quickly.

Instructions

Validate the Terraform/OpenTofu config and return a compact pass/fail summary with diagnostics.

Input Schema

NameRequiredDescriptionDefault
cwdYesTerraform project directory
binaryNoterraform or tofu (default $TF_BINARY, else terraform)

Output Schema

NameRequiredDescriptionDefault
validYes
retainedNo
errorCountYes
diagnosticsYes
warningCountYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

TDQS

A3.6/5.0
Behavior3/5

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

The readOnlyHint annotation is consistent with the description, and the phrase 'compact pass/fail summary with diagnostics' usefully characterizes the output. However it does not disclose operational traits such as whether validation requires prior init, provider/network access, or how long it may take, which are the real behavioral risks here.

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?

One sentence, front-loaded with the action and ending with the return shape. There is no filler and nothing to trim.

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?

For a two-parameter tool with an output schema and a read-only annotation, the description covers what it does and what comes back. Only the operational prerequisites for running validation are missing.

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%, so both parameters are already documented in the schema and the baseline applies. The description's mention of Terraform/OpenTofu loosely corroborates the binary enum but adds no new syntax or format guidance.

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?

States a specific verb (validate) and resource (Terraform/OpenTofu config) plus what it returns. It does not explicitly differentiate itself from neighboring tf_ tools such as tf_plan_summary, so it stops short of a 5.

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?

Usage is only implied by the word 'validate' — an agent can infer it belongs before a plan, but the description names no alternatives and gives no when/when-not condition. Nothing steers the agent away from tf_plan_summary for syntax-only checks.

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