Skip to main content
Glama

Review Terraform Security

review_terraform_security
Read-onlyIdempotent

Inspect raw Terraform plan JSON to flag destructive actions, public exposure, encryption gaps, deletion protection issues, and IAM wildcard risks without executing Terraform or writing state.

Instructions

Inspect raw Terraform plan JSON for security-relevant changes such as destructive actions, public exposure, encryption gaps, deletion protection and IAM wildcard risk. Use this for Terraform security posture; use assess_terraform_change for broader release/change risk and governance. It parses the supplied plan only and does not execute Terraform or write state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
environmentNoOptional target environment used to contextualize the severity of findings.
terraformPlanJsonYesRaw Terraform plan JSON, typically produced by terraform show -json, to inspect for security-relevant resource changes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
findingsYes
riskLevelYes
riskScoreYes
policyPackYes
environmentYes
findingCountYes
highFindingsYes
replacementsYes
mediumFindingsYes
recommendedGateYes
changedResourcesYes
criticalFindingsYes
destructiveChangesYes
assessmentConfidenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.14.0
    • addedInput schema / properties / environment / description
      Added value: +"Optional target environment used to contextualize the severity of findings."
    • addedInput schema / properties / terraformPlanJson / description
      Added value: +"Raw Terraform plan JSON, typically produced by terraform show -json, to inspect for security-relevant resource changes."
  2. First observedv0.4.0

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered structurally. The description still adds real value by clarifying the operational contract: it 'parses the supplied plan only and does not execute Terraform or write state.' It omits any note on size limits or finding/severity output shape, though the output schema covers returns.

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?

Three tight sentences: capability first, routing rule second, execution contract third. Every clause carries information and the scoping constraint (parses only) is placed where it matters.

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 a full output schema, complete parameter descriptions, and rich annotations, the description only needs to add scope, sibling routing, and side-effect clarity – all three are present. Nothing an agent needs to select or invoke this correctly is 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 description coverage is 100%, so both parameters are already documented in the schema, including the environment enum's role in contextualizing severity and the plan JSON's expected origin (terraform show -json). The description adds no syntax or format detail beyond that, so the baseline 3 applies.

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?

Names a specific verb ('Inspect') and resource ('raw Terraform plan JSON') and enumerates the concrete security categories it detects: destructive actions, public exposure, encryption gaps, deletion protection, IAM wildcards. It explicitly distinguishes itself from the closest sibling by naming assess_terraform_change, so an agent can differentiate without opening either schema.

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

Usage Guidelines5/5

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

States the selection rule directly: 'Use this for Terraform security posture; use assess_terraform_change for broader release/change risk and governance.' This gives both the when-to-use condition and the named alternative with its own condition, leaving nothing to inference.

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