@@ -15,13 +15,14 @@ This MCP server is designed to help you leverage Terraform IBM Modules (TIM) to
1515
1616## Purpose of this MCP Server
1717
18- The main purpose of this MCP server is to help generate terraform-based compositions of modules. It provides tools to:
18+ The main purpose of this MCP server is to help generate terraform-based compositions of modules. It provides tools and resources to:
1919
20- 1 . Search for relevant Terraform IBM Modules
21- 2 . Discover available examples and repository structure
22- 3 . Get detailed information about modules, including inputs, outputs, and examples
23- 4 . Access example code and specific files to understand how to use and combine modules
24- 5 . Generate complete, working Terraform configurations
20+ 1 . Browse the module index for a high-level overview of available modules
21+ 2 . Search for specific Terraform IBM Modules when needed
22+ 3 . Discover available examples and repository structure
23+ 4 . Get detailed information about modules, including inputs, outputs, and examples
24+ 5 . Access example code and specific files to understand how to use and combine modules
25+ 6 . Generate complete, working Terraform configurations
2526
2627## Architectural Best Practices
2728
@@ -44,10 +45,11 @@ The server supports two distinct workflows based on user intent:
4445
4546Keywords to detect this intent: "example", "sample", "deploy", "show me", "simple"
4647
47- 1 . ** ` search_modules ` ** → Find relevant modules
48- 2 . ** ` get_module_details ` ** → Understand module capabilities using module ID from search results
49- 3 . ** ` list_content ` ** → Check what examples are available for the module
50- 4 . ** ` get_content ` ** → Fetch example Terraform files (main.tf, provider.tf, version.tf)
48+ 1 . First, check the ** ` catalog://terraform-ibm-modules-index ` ** resource to get a broad, high-level picture of available modules
49+ 2 . If needed, use ** ` search_modules ` ** to find more specific modules (optional if the index provides enough information)
50+ 3 . Use ** ` get_module_details ` ** to understand module capabilities using module ID from the index or search results
51+ 4 . Use ** ` list_content ` ** to check what examples are available for the module
52+ 5 . Use ** ` get_content ` ** to fetch example Terraform files (main.tf, provider.tf, version.tf)
5153
5254The example files provide valuable insights:
5355- ** Main configuration file** : Shows how to use and combine the module with others
@@ -62,14 +64,22 @@ Note: File names may vary (e.g., main.tf, provider.tf, version.tf, variables.tf,
6264
6365Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop"
6466
65- 1 . ** ` search_modules ` ** → Find relevant modules
66- 2 . ** ` get_module_details ` ** → Understand inputs/outputs/interface using module ID from search results
67- 3 . ** ` list_content ` ** → Explore available examples and structure
68- 4 . ** ` get_content ` ** → Fetch example files to understand usage patterns and provider setup
67+ 1 . First, check the ** ` catalog://terraform-ibm-modules-index ` ** resource to get a broad, high-level picture of available modules
68+ 2 . If needed, use ** ` search_modules ` ** to find more specific modules (optional if the index provides enough information)
69+ 3 . Use ** ` get_module_details ` ** to understand inputs/outputs/interface using module ID from the index or search results
70+ 4 . Use ** ` list_content ` ** to explore available examples and structure
71+ 5 . Use ** ` get_content ` ** to fetch example files to understand usage patterns and provider setup
6972
70- ## Tool Usage Tips
73+ ## Resource and Tool Usage Tips
74+
75+ ### Module Index Resource
76+ - Start with the module index resource (` catalog://terraform-ibm-modules-index ` ) to get a broad, high-level picture of available modules
77+ - Use the index to understand the overall ecosystem of available modules before diving into specific searches
78+ - The index provides a comprehensive overview that can help identify the most relevant modules for your needs
79+ - Only proceed to search if the index doesn't provide enough specific information
7180
7281### Search Strategy
82+ - Use search only when you need more specific results than what the index provides
7383- Use specific terms rather than generic ones (e.g., "vpc" better than "network")
7484- Be specific in requests to minimize context usage and API calls
7585- Consider download counts as indicators of module quality and maintenance
@@ -88,11 +98,12 @@ Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop
8898
8999## Optimization Principles
90100
91- 1 . ** Be specific in requests** to minimize context usage and API calls
92- 2 . ** Start with narrow scope** (specific files/paths), broaden only if needed
93- 3 . ** Exclude test files by default** : ` [".*test.*", ".*\\.tftest$", ".*_test\\..*"] `
94- 4 . ** For examples, prefer single targeted example** over fetching all examples
95- 5 . ** Avoid multiple searches** unless comparing approaches
101+ 1 . ** Start with the module index resource** to get a comprehensive overview before specific searches
102+ 2 . ** Be specific in requests** to minimize context usage and API calls
103+ 3 . ** Start with narrow scope** (specific files/paths), broaden only if needed
104+ 4 . ** Exclude test files by default** : ` [".*test.*", ".*\\.tftest$", ".*_test\\..*"] `
105+ 5 . ** For examples, prefer single targeted example** over fetching all examples
106+ 6 . ** Avoid multiple searches** unless comparing approaches
96107
97108## Example Workflows
98109
@@ -103,8 +114,8 @@ Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop
103114
104115** Workflow:**
105116```
106- 1. search_modules("vpc")
107- # Returns: terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0 (among others)
117+ 1. Check catalog://terraform-ibm-modules-index
118+ # Browse the index to identify relevant VPC modules
1081192. get_module_details("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
109120 # Understand module capabilities, inputs, outputs
1101213. list_content("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
@@ -120,8 +131,8 @@ Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop
120131
121132** Workflow:**
122133```
123- 1. search_modules("vpc")
124- # Returns: terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0 (among others)
134+ 1. Check catalog://terraform-ibm-modules-index
135+ # Browse the index to identify relevant VPC modules
1251362. get_module_details("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
126137 # Get detailed inputs, outputs, and module interface
1271383. list_content("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
@@ -138,12 +149,12 @@ Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop
138149
139150** Workflow:**
140151```
141- 1. search_modules("vpc")
142- # Returns: terraform-ibm- modules/landing-zone-vpc/ibm/8.4.0, etc.
152+ 1. Check catalog://terraform-ibm-modules-index
153+ # Browse the index to identify relevant modules for VPC, security groups, and clusters
1431542. search_modules("security group")
144- # Returns: terraform-ibm-modules/ security- group/ibm/2.7.0, etc.
155+ # Optional: Search for specific security group modules if needed
1451563. search_modules("cluster")
146- # Returns: terraform-ibm- modules/base-ocp-vpc/ibm/3.62.0, etc.
157+ # Optional: Search for specific cluster modules if needed
1471584. get_module_details("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
1481595. get_module_details("terraform-ibm-modules/security-group/ibm/2.7.0")
1491606. get_module_details("terraform-ibm-modules/base-ocp-vpc/ibm/3.62.0")
@@ -159,8 +170,8 @@ Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop
159170
160171** Workflow:**
161172```
162- 1. search_modules("vpc")
163- # Returns: terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0, etc.
173+ 1. Check catalog://terraform-ibm-modules-index
174+ # Browse the index to identify relevant VPC modules
1641752. get_module_details("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
165176 # Understand what the module does and its capabilities
1661773. list_content("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
@@ -176,8 +187,8 @@ Keywords to detect this intent: "create", "build", "inputs", "outputs", "develop
176187
177188** Workflow:**
178189```
179- 1. search_modules("vpc")
180- # Returns: terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0, etc.
190+ 1. Check catalog://terraform-ibm-modules-index
191+ # Browse the index to identify relevant VPC modules
1811922. get_module_details("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
182193 # Understand module interface
1831943. list_content("terraform-ibm-modules/landing-zone-vpc/ibm/8.4.0")
@@ -249,6 +260,11 @@ When generating Terraform configurations:
249260- Only use IBM Cloud Terraform provider resources when no appropriate module exists
250261- Gain insights from example code to understand when to use modules vs provider resources
251262
263+ ### Module Discovery
264+ - ** Start with the module index resource** to get a comprehensive overview of available modules
265+ - Use search only when you need more specific information than what the index provides
266+ - The index gives you a broad, high-level picture that helps identify the most relevant modules
267+
252268### Search Strategy
253269- Use specific, targeted search terms
254270- Limit results appropriately to avoid information overload
0 commit comments