Skip to main content
Glama

tf_summarize_plan

Read-onlyIdempotent

Summarize a saved Terraform plan by prioritizing deletes, replaces, updates, creates, imports, moves, drift, and output changes, with destroy warnings and sensitive values redacted.

Instructions

Summarize a saved Terraform plan: deletes and replaces first (with the attribute that forces each replace), updates with changed paths, creates, imports, moves, forgets, drift and output changes, plus a destroy warning that names renames needing a moved block. Pass plan_file (binary from terraform plan -out, rendered with terraform show -json in dir, or a plan JSON file) or plan_json (e.g. from the official terraform MCP server's get_plan_json_output(plan_id) for an HCP run; get the plan id from its get_run_details). Prints no values: sensitive paths are truncated, import IDs omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dirNoTerraform root module directory (must already be initialized). Default: TERRAFORM_CWD_MCP_DIR, else the server's working directory.
max_pathsNoChanged attribute paths listed per updated resource (default 8)
plan_fileNoSaved plan (binary from `terraform plan -out`, rendered here with `terraform show -json` in `dir`) or a plan JSON file; relative paths resolve against dir
plan_jsonNoPlan JSON text, e.g. from the official terraform MCP server's get_plan_json_output
max_per_sectionNoMax entries listed per section (default 50)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, and closed-world, so the safety profile is covered. The description adds substantive behavior beyond that: it prints no values, truncates sensitive paths, and omits import IDs, plus it flags that destroy output names renames requiring a moved block. It stops short of describing error behavior when neither plan_file nor plan_json is supplied.

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?

Two sentences, purpose front-loaded before the input discussion, and nearly every clause carries distinct information (section inventory, input provenance, output redaction). It is dense to the point of being clause-heavy, but there is little that could be cut without losing signal.

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?

With no output schema, the description carries the return-value burden and does: it lists the report sections and states that sensitive values are truncated and import IDs omitted. With zero required parameters it still tells the agent which input to pass and where that input comes from, so an agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning for the two plan inputs: plan_file is a binary from `terraform plan -out` rendered with `terraform show -json` in `dir`, or a plan JSON file, while plan_json is JSON text typically sourced from a specific sibling HCP server call. dir, max_paths, and max_per_section are left to the schema, which documents them adequately.

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?

Opens with a specific verb+resource ("Summarize a saved Terraform plan") and then enumerates exactly what the summary contains: deletes/replaces with the forcing attribute, updates with changed paths, creates, imports, moves, forgets, drift, output changes, and a destroy warning about renames needing a moved block. That level of detail makes it unmistakable versus siblings like tf_state_addresses, tf_show_resource, or tf_upgrade_impact, which all cover different resources or phases.

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?

Clearly states the invocation context: supply plan_file or plan_json, and it names the concrete upstream source of plan_json (the official terraform MCP server's get_plan_json_output(plan_id), with plan_id from get_run_details), which is genuine routing guidance. It does not state when this tool should *not* be used (e.g. for planning an unsaved change, or for examining a single resource, where tf_show_resource would be the pick), so it stops short of explicit exclusions.

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