Skip to main content
Glama
omattsson

Terragrunt MCP Server

by omattsson

build_config

Generate Terragrunt HCL configuration for remote_state backends, provider generation, dependencies, hooks, inputs, and CI/CD pipelines, with dry-run preview and diffing against existing files.

Instructions

Generate or write Terragrunt HCL configuration files (terragrunt.hcl). Use cases: remote_state backends (S3, GCS, Azure), provider generation, dependency blocks, hooks, inputs, and cicd (CI/CD-ready config for GitHub Actions, GitLab, Azure DevOps).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoFile path
tierNoTemplate tieressential
writeNoWrite to disk
backendNoFor remote_state, the backend type (s3, azurerm, gcs). For cicd, the platform (github-actions, gitlab, azure-devops).
contentNoHCL content to write
optionsNoTemplate variables
previewNoDry-run: never write; return what would be written plus a diff and overwrite/backup info
useCaseNoUse case
overwriteNoAllow overwrite
compareWithNoPath of an existing file to diff the result against (defaults to path in preview mode)
createBackupNoCreate backup
createParentDirsNoCreate parent dirs
strictValidationNoStrict validation

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.2.0
    • changedInput schema / properties / backend / description
      Previous value: -"Backend type"New value: +"For remote_state, the backend type (s3, azurerm, gcs). For cicd, the platform (github-actions, gitlab, azure-devops)."
    • addedInput schema / properties / compareWith
      Added value: +{
      +  "description": "Path of an existing file to diff the result against (defaults to path in preview mode)",
      +  "type": "string"
      +}
    • addedInput schema / properties / preview
      Added value: +{
      +  "default": false,
      +  "description": "Dry-run: never write; return what would be written plus a diff and overwrite/backup info",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / useCase / enum
      Previous value: -[
      -  "remote_state",
      -  "provider_generation",
      -  "dependencies",
      -  "hooks",
      -  "inputs"
      -]New value: +[
      +  "remote_state",
      +  "provider_generation",
      +  "dependencies",
      +  "hooks",
      +  "inputs",
      +  "cicd"
      +]
  2. First observedv1.1.0

TDQS

A3.9/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 of behavioral disclosure. It does acknowledge the tool can 'write' HCL files to disk, which signals mutating capabilities, but it never states the default behavior (generate vs. write), the output/return shape, overwrite/backup implications, or the role of preview/diff. The description is not misleading but is thin on behavioral context for a mutation-capable tool.

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 well-structured sentences with zero waste: the first front-loads the core purpose (generate/write terragrunt.hcl), the second efficiently enumerates the supported use cases in a scannable list. Every phrase carries information, and no sentence is redundant.

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?

For a complex 13-parameter tool with no output schema and no annotations, this description is only partially complete. It nails the purpose and use cases but omits default mode (write=false, preview=false per schema), what the function returns (generated HCL preview? diff?), and the destructive implications of writing over files. The schema covers parameters, but the mutation risk and lack of output schema leave important gaps.

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 the baseline is 3 even without parameter info in the description. The description adds some organizing value by mapping use cases to backend/platform categories (e.g., remote_state → S3/GCS/Azure, cicd → GitHub Actions/GitLab/Azure DevOps), which aligns with the useCase and backend enums, but it does not substantially extend what the schema already documents.

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?

States a specific verb ('Generate or write') and a specific resource ('Terragrunt HCL configuration files (terragrunt.hcl)') and immediately distinguishes the tool from all siblings (get_server_metrics, search_docs, function_reference, get_hcl_config_reference, diagnose_terragrunt_error) by establishing it as the config-generation tool. The enumerated use cases (remote_state backends, provider generation, dependency blocks, hooks, inputs, cicd) make its scope concrete and unambiguous.

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?

The description gives clear use-case context, listing exact scenarios like remote_state backends (S3, GCS, Azure) and CI/CD platforms (GitHub Actions, GitLab, Azure DevOps), so an agent knows when this tool is the right one. However, it provides no explicit exclusions or mention of alternatives among siblings — e.g., when the agent should prefer get_hcl_config_reference, cli_reference, or get_guidance instead.

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