Skip to main content
Glama

compare_plans

Compare two Terraform/OpenTofu plan JSON files to detect resources added, removed, action changes, and masked attribute diffs between environments or code changes.

Instructions

Compare two plans of the same configuration (for example before and after a code change, or two environments): resource changes new in B, gone in B, with a different action, or the same action but different planned values (shown as masked attribute diffs).

Input Schema

NameRequiredDescriptionDefault
limitNo
path_aYes
path_bYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations, the description carries the full disclosure burden. It does state the core precondition ('same configuration') and enumerates the diff categories returned (new in B, gone in B, changed action, changed planned values with masked diffs), but it never says the operation is read-only, what happens if the plans are incompatible or unparsable, or whether results are paginated.

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?

The definition is a single well-formed sentence with the primary action front-loaded and the illustrative cases kept in a parenthetical. It is dense without being padded; only the masked-diff detail feels like it could be trimmed since an output schema already exists.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so the return-shape discussion is a bonus rather than a requirement, and the description is complete on intent. It is still thin for a tool with zero schema documentation: the meaning of path_a/path_b, the format of inputs, and the effect of limit on results are all left unexplained.

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 0% — parameters are bare titles like 'Path A' — so the description must compensate. It partially does by establishing that the two paths are plans and that diff semantics are B-relative ('new in B, gone in B'), which gives directionality the schema does not. However, it never clarifies what a 'path' actually is (file, directory, plan artifact) and the 'limit' parameter is not mentioned at all, so the compensation is incomplete.

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 gives a specific verb and resource ('Compare two plans') and scopes it to plans of the same configuration, with concrete illustrative cases (pre/post code change, two environments). It is not explicitly differentiated from the sibling diff_resource, which sounds close in function, so it falls 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?

The parenthetical examples ('before and after a code change, or two environments') imply when the tool is appropriate, which is more than nothing. However, there is no explicit statement of when not to use it and no pointer to plan_summary, diff_resource, or list_changes as alternatives, leaving the agent to infer tool selection.

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