Skip to main content
Glama

explain_replace

Explains why a Terraform/OpenTofu resource is being replaced by showing the action reason, forcing attribute changes, replacement order, operational impact, lifecycle hints, and dependent references.

Instructions

Explain why a resource is being replaced: the action_reason, the forcing attribute(s) from replace_paths with their before -> after values, the order (destroy-then-create vs create_before_destroy), what that means (downtime, name collisions), the lifecycle hint from the plan's configuration when present, and the dependents that reference it.

Input Schema

NameRequiredDescriptionDefault
pathYes
addressYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

With no annotations provided, the description carries the full burden, and it does disclose substantive interpretation behavior: it distinguishes destroy-then-create from create_before_destroy and explains the consequences (downtime, name collisions), plus notes that the lifecycle hint is only present "when present." However, it omits that this is a read-only analysis operation and says nothing about behavior when the resource is not actually being replaced (error vs. empty result).

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?

A single front-loaded sentence beginning with the verb and resource, followed by a comma-separated enumeration of what is returned. Dense but purposeful; no filler sentences, though the long list is slightly harder to scan than a short structured form.

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?

The return content is well covered (and an output schema also exists, lowering that burden), but for a tool that requires two entirely undocumented required parameters and has no annotations, the definition leaves key calling prerequisites unexplained. An agent knows what it will learn, not how to invoke it correctly.

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

Parameters2/5

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

Schema description coverage is 0% for both required parameters, and the description does not compensate: "path" is never clarified as a plan file/directory location, and "address" format (resource address syntax) is left entirely implicit. The mention of "replace_paths" refers to output content, not the input parameter, so it may even mislead.

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: "Explain why a resource is being replaced," and enumerates the exact contents of the explanation (action_reason, forcing attributes, ordering semantics, dependents). The scope is unmistakable without opening the schema, though it never contrasts itself with overlapping siblings such as diff_resource or risky_changes.

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

Usage Guidelines2/5

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

The description says what the tool explains but never states when to call it versus alternatives like diff_resource, risky_changes, or plan_summary, nor any prerequisite such as needing an existing plan. Usage is only inferable from the title phrasing.

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