An MCP server that provides Terraform best practices documentation, module structure guidance, code pattern templates, configuration validation, and improvement suggestions
Server has 5 tools with explicit schemas and descriptions visible in source. All tools are READ_ONLY and follow verb_noun naming (GetBestPractices, GetModuleStructure, GetPatternTemplate, ValidateConfiguration, SuggestImprovements). Descriptions are present (avg ~120 chars) and explain WHAT each tool does. However, parameter descriptions lack actionable constraints (no enums, ranges, or format specs). Output schemas are inferred from struct definitions but not formally documented in tool descriptions. Error handling is minimal, no recovery guidance or categorization. Missing tool annotations (readOnlyHint, idempotentHint). ValidateConfiguration and SuggestImprovements accept 'files' object but lack guidance on expected file structure, naming conventions, or size limits.
Retrieves Terraform best practices documentation, optionally filtered by topic, category, provider, or keywords
Retrieves Terraform module structure documentation, optionally filtered by type or provider
Retrieves Terraform code pattern templates, optionally filtered by ID, category, provider, complexity, tags, or search query
Analyzes a Terraform configuration and suggests improvements including missing files, code structure enhancements, and best practice implementations
Validates a Terraform configuration against best practices and returns validation issues with severity levels and suggestions
Parameter constraints missing: 'provider' and 'category' accept free-form strings with no enum or validation. LLMs will hallucinate invalid values like 'aws-lambda' instead of 'aws'. Add enums: provider=[aws|azure|gcp|...], category=[structure|organization|security|...].
Output schemas not documented in tool descriptions. Agents cannot plan downstream calls without knowing what fields are returned. Document: GetBestPractices returns {practices: [{id, title, category, description, content, provider, tags, references}]}, etc.
ValidateConfiguration and SuggestImprovements accept 'files' object but lack schema documentation. What keys are expected? Are filenames like 'main.tf', 'variables.tf' required? What is max file size? Add: 'files: object with keys as filenames (e.g. main.tf, variables.tf) and values as file contents (string, max 100KB per file).'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | B | 70 | <=2025-11-25 | v2 |
No error handling guidance. If ValidateConfiguration fails (e.g. invalid HCL syntax), what does the LLM do? Add: 'On parse error, returns {issues: [{message, file, line}]}. If no issues found, returns {issues: []}.' Categorize errors as retryable vs user-fixable.
Tool annotations missing. All 5 tools are read-only and idempotent but lack readOnlyHint and idempotentHint in schema. Add to Describe() output: 'readOnly: true, idempotent: true' so agents know these are safe to retry.