optimized TB-MCP server with intelligent NS management and optimized API policies#2068
Merged
cb-github-robot merged 1 commit intocloud-barista:mainfrom Aug 3, 2025
Merged
Conversation
… optimized API policies Major Features Added: • Smart namespace management with automatic validation and creation • Intelligent image selection with metadata analysis (no hardcoded patterns) • Spec-first workflow for optimal CSP/region selection • Advanced MCI creation functions with comprehensive error handling New MCP Tools: • check_and_prepare_namespace(): Intelligent namespace guidance • validate_namespace(): Namespace existence validation • create_namespace_with_validation(): Safe namespace creation • select_best_image(): Smart image selection with detailed reasoning • select_best_image_with_context(): Context-aware image selection for specific use cases • create_mci_with_namespace_management(): MCI creation with auto namespace handling • create_mci_with_spec_first(): Advanced spec-first workflow (RECOMMENDED) • get_mci_associated_resources(): Get all resources used by MCI • check_resource_exists(): Validate resources before use API Optimization: • install_mon_agent policy: Only include parameter when explicitly set to 'yes' • Reduced API overhead by omitting default 'no' values • Conditional parameter inclusion for better performance Intelligent Image Selection: • Priority 1: Images with isBasicImage: true (highest priority) • Priority 2: Smart metadata analysis for general OS detection • Scoring system: Standard OS (+10), Official/Basic (+5), Specialized software (-3) • Detailed selection reasoning with analysis explanations Enhanced Error Handling: • Comprehensive validation before API calls • Detailed error messages with actionable suggestions • Fallback mechanisms with clear reasoning • Namespace guidance for failed operations Workflow Improvements: • Spec-first approach: VM specs determine CSP/region, then find compatible images • Automated namespace management eliminates common creation failures • Smart prompts with updated workflow examples • Better integration between search_images() and recommend_vm_spec() User Experience: • Reduced complexity for common MCI creation scenarios • Clear workflow guidance with practical examples • Intelligent defaults with override capabilities • Comprehensive result objects with detailed metadata This update significantly improves the MCP server's usability and reliability, providing intelligent automation while maintaining flexibility for advanced users.
Member
Author
|
/approve |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Major Features Added:
• Smart namespace management with automatic validation and creation • Intelligent image selection with metadata analysis (no hardcoded patterns) • Spec-first workflow for optimal CSP/region selection • Advanced MCI creation functions with comprehensive error handling
New MCP Tools:
• check_and_prepare_namespace(): Intelligent namespace guidance • validate_namespace(): Namespace existence validation • create_namespace_with_validation(): Safe namespace creation • select_best_image(): Smart image selection with detailed reasoning • select_best_image_with_context(): Context-aware image selection for specific use cases • create_mci_with_namespace_management(): MCI creation with auto namespace handling • create_mci_with_spec_first(): Advanced spec-first workflow (RECOMMENDED) • get_mci_associated_resources(): Get all resources used by MCI • check_resource_exists(): Validate resources before use
API Optimization:
• install_mon_agent policy: Only include parameter when explicitly set to 'yes' • Reduced API overhead by omitting default 'no' values • Conditional parameter inclusion for better performance
Intelligent Image Selection:
• Priority 1: Images with isBasicImage: true (highest priority) • Priority 2: Smart metadata analysis for general OS detection • Scoring system: Standard OS (+10), Official/Basic (+5), Specialized software (-3) • Detailed selection reasoning with analysis explanations
Enhanced Error Handling:
• Comprehensive validation before API calls
• Detailed error messages with actionable suggestions • Fallback mechanisms with clear reasoning
• Namespace guidance for failed operations
Workflow Improvements:
• Spec-first approach: VM specs determine CSP/region, then find compatible images • Automated namespace management eliminates common creation failures • Smart prompts with updated workflow examples
• Better integration between search_images() and recommend_vm_spec()
User Experience:
• Reduced complexity for common MCI creation scenarios • Clear workflow guidance with practical examples
• Intelligent defaults with override capabilities
• Comprehensive result objects with detailed metadata
This update significantly improves the MCP server's usability and reliability, providing intelligent automation while maintaining flexibility for advanced users.