Skip to main content
Glama

Terraform plan summary

tf_plan_summary
Read-only

Runs Terraform plan and returns a structured summary of add, change, destroy, and replace counts plus affected resources to review infrastructure changes without parsing raw CLI output.

Instructions

Run terraform plan and return a structured summary of changes (add/change/destroy counts and affected resources). Each action is create, update, delete, replace or read; a replace counts in add and destroy, as terraform's Plan line does.

Input Schema

NameRequiredDescriptionDefault
cwdYesTerraform project directory
binaryNoterraform or tofu (default $TF_BINARY, else terraform)
targetNoTarget specific resource
varFileNoVar file to use
planFileNoPath to a saved plan file (from `terraform plan -out`); summarized via `show -json` instead of re-running plan.

Output Schema

NameRequiredDescriptionDefault
addYes
changeYes
changesYes
destroyYes
retainedNo
noChangesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv5.0.1

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, and the description is consistent with that — it only reads/plans. The description earns credit by disclosing non-obvious output semantics: a replace is counted in both add and destroy, matching Terraform's own Plan line, which prevents an agent from misreading the counts. It omits runtime, lock contention and failure behavior, which keeps it out of the top band.

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, front-loaded with the action and result shape, followed by the one counting detail that genuinely needs stating. No filler or restatement of the title.

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?

With an output schema present and annotations covering safety, the description supplies the one interpretive rule an agent needs to read the summary correctly. It is nearly complete; only prerequisites and error/runtime behavior for a potentially slow command are left unaddressed.

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%, including the binary default chain and the planFile/show -json behavior, so the schema already carries parameter meaning. The description adds the replace double-counting rule but no additional per-parameter semantics beyond what the schema states.

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 and resource: run `terraform plan` and return a structured change summary with add/change/destroy counts. It also pins down the action vocabulary (create/update/delete/replace/read), which no sibling tool covers. It stops short of naming a sibling such as tf_show, so the boundary between 'run a plan' and 'show a plan' is left implicit.

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?

The planFile sentence implicitly tells the agent when to summarize a saved plan instead of re-running one, which is a real usage branch. There is no explicit when-to-use/when-not guidance versus tf_show, tf_validate_summary or the other tf_* siblings, and no prerequisites (init, backend auth, credentials) are mentioned.

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