Skip to main content
Glama

llm_cloud_management

Manage cloud operations across AWS, Azure, and GCP using LLM-generated commands with research-driven best practices.

Instructions

LLM-managed cloud provider operations with research-driven approach

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesCloud provider to use
actionYesAction to perform
parametersNoAction parameters
llmInstructionsYesLLM instructions for command generation
researchFirstNoResearch best approach first
projectPathNoPath to project directory.
adrDirectoryNoDirectory containing ADR filesdocs/adrs

Implementation Reference

  • The core handler function that implements LLM-driven cloud management operations. Orchestrates research, LLM command generation, execution (simulated), and returns formatted results with analysis.
    export async function llmCloudManagement(
      args: {
        provider: 'aws' | 'azure' | 'gcp' | 'redhat' | 'ubuntu' | 'macos';
        action: string;
        parameters?: Record<string, any>;
        llmInstructions: string;
        researchFirst?: boolean;
        projectPath?: string;
        adrDirectory?: string;
      },
      context?: ToolContext
    ): Promise<any> {
      const {
        provider,
        action,
        parameters = {},
        llmInstructions,
        researchFirst = true,
        projectPath,
        adrDirectory,
      } = args;
    
      if (!provider || !action || !llmInstructions) {
        throw new McpAdrError(
          'Provider, action, and llmInstructions are required',
          'MISSING_REQUIRED_PARAMS'
        );
      }
    
      try {
        context?.info(`🔧 Initializing ${provider} cloud management for: ${action}`);
        context?.report_progress(0, 100);
    
        // Initialize research orchestrator
        const orchestrator = new ResearchOrchestrator(projectPath, adrDirectory);
    
        let researchResult = null;
        if (researchFirst) {
          context?.info('📚 Researching best practices and documentation...');
          context?.report_progress(20, 100);
    
          // Step 1: Research the best approach
          const researchQuery = `
    How to ${action} on ${provider} platform?
    Best practices for ${provider} ${action}
    ${provider} ${action} documentation and examples
    Security considerations for ${provider} ${action}
    ${llmInstructions}
    `;
          researchResult = await orchestrator.answerResearchQuestion(researchQuery);
        }
    
        // Step 2: Generate command using LLM
        context?.info('🤖 Generating commands with LLM guidance...');
        context?.report_progress(50, 100);
    
        const command = await generateCloudCommand({
          provider,
          action,
          parameters,
          research: researchResult,
          instructions: llmInstructions,
        });
    
        // Step 3: Execute the command (simulated for now)
        context?.info(`☁️ Executing ${provider} operation...`);
        context?.report_progress(80, 100);
    
        const executionResult = await executeCloudCommand(command);
    
        context?.info('✅ Cloud operation complete!');
        context?.report_progress(100, 100);
    
        return {
          content: [
            {
              type: 'text',
              text: `# LLM-Managed Cloud Operation
    
    ## Operation Details
    - **Provider**: ${provider}
    - **Action**: ${action}
    - **Parameters**: ${JSON.stringify(parameters, null, 2)}
    
    ## LLM Instructions
    ${llmInstructions}
    
    ${
      researchResult
        ? `
    ## Research Results
    - **Confidence**: ${(researchResult.confidence * 100).toFixed(1)}%
    - **Sources**: ${researchResult.metadata.sourcesQueried.join(', ')}
    - **Research Summary**: ${researchResult.answer}
    
    `
        : ''
    }
    
    ## Generated Command
    \`\`\`bash
    ${command.generated}
    \`\`\`
    
    ## Execution Result
    ${executionResult.success ? '✅ Success' : '❌ Failed'}
    ${executionResult.output ? `\n\`\`\`\n${executionResult.output}\n\`\`\`` : ''}
    
    ## LLM Analysis
    ${command.analysis || 'No analysis available'}
    
    ## Metadata
    - **Command Confidence**: ${(command.confidence * 100).toFixed(1)}%
    - **Timestamp**: ${new Date().toISOString()}
    - **Research-Driven**: ${researchFirst ? 'Yes' : 'No'}
    `,
            },
          ],
        };
      } catch (error) {
        throw new McpAdrError(
          `Cloud management operation failed: ${error instanceof Error ? error.message : String(error)}`,
          'CLOUD_MANAGEMENT_ERROR'
        );
      }
    }
  • Tool catalog registration providing metadata, input schema, and categorization for the llm_cloud_management tool.
    TOOL_CATALOG.set('llm_cloud_management', {
      name: 'llm_cloud_management',
      shortDescription: 'Cloud management via LLM',
      fullDescription: 'Cloud resource management with LLM assistance.',
      category: 'research',
      complexity: 'complex',
      tokenCost: { min: 3000, max: 6000 },
      hasCEMCPDirective: true, // Phase 4.3: Complex tool - cloud management orchestration
      relatedTools: ['llm_web_search', 'llm_database_management'],
      keywords: ['cloud', 'management', 'llm', 'aws', 'gcp', 'azure'],
      requiresAI: true,
      inputSchema: {
        type: 'object',
        properties: {
          operation: { type: 'string' },
          provider: { type: 'string', enum: ['aws', 'gcp', 'azure'] },
        },
        required: ['operation'],
      },
    });
  • Helper function for generating cloud commands using LLM (currently placeholder implementation).
    async function generateCloudCommand(context: {
      provider: string;
      action: string;
      parameters: Record<string, any>;
      research: any;
      instructions: string;
    }): Promise<{ generated: string; confidence: number; analysis: string }> {
      // const { loadAIConfig, getAIExecutor } = await import('../config/ai-config.js');
      // const aiConfig = loadAIConfig();
      // const executor = getAIExecutor();
    
      // const prompt = `
      // Generate a ${context.provider} command for the following operation:
      //
      // Action: ${context.action}
      // Parameters: ${JSON.stringify(context.parameters, null, 2)}
      // Instructions: ${context.instructions}
      //
      // ${context.research ? `
      // Research Context:
      // - Confidence: ${(context.research.confidence * 100).toFixed(1)}%
      // - Sources: ${context.research.metadata.sourcesQueried.join(', ')}
      // - Key Findings: ${context.research.answer}
      // ` : ''}
      //
      // Provider Context:
      // ${getProviderContext(context.provider)}
      //
      // Generate the CLI command and provide analysis of the approach.
      // `;
    
      // TODO: Implement LLM command generation when AI executor is available
      // const result = await executor.executeStructuredPrompt(prompt, {
      //   type: 'object',
      //   properties: {
      //     command: { type: 'string' },
      //     confidence: { type: 'number' },
      //     analysis: { type: 'string' }
      //   }
      // });
    
      // return {
      //   generated: result.data.command || 'echo "Command generation failed"',
      //   confidence: result.data.confidence || 0.5,
      //   analysis: result.data.analysis || 'No analysis available'
      // };
    
      // Placeholder implementation
      return {
        generated: `echo "LLM command generation for ${context.provider} ${context.action} not yet implemented"`,
        confidence: 0.3,
        analysis: 'LLM command generation is not yet available. This is a placeholder implementation.',
      };
    }
  • Helper function for executing generated cloud commands (simulated).
    async function executeCloudCommand(command: {
      generated: string;
      confidence: number;
    }): Promise<{ success: boolean; output: string }> {
      // For now, simulate command execution
      // In a real implementation, this would execute the actual command
      return {
        success: command.confidence > 0.7,
        output: `Simulated execution of: ${command.generated}\n\nThis is a simulation. In production, this would execute the actual command.`,
      };
    }
  • Tool listing in server context generator with name and description.
    { name: 'llm_cloud_management', description: 'Manage cloud resources and infrastructure' },
    { name: 'llm_database_management', description: 'Manage database operations and queries' },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'LLM-managed' and 'research-driven approach', which hints at AI-generated commands and preliminary research, but doesn't specify critical behaviors like whether it performs destructive operations, requires authentication, has rate limits, or what the expected output format is. The description is insufficient for a tool with 7 parameters and no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with no wasted words. It's appropriately sized for a high-level overview, though it could benefit from being more front-loaded with specific purpose information. The structure is clean but under-specified rather than concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 7 parameters, no annotations, no output schema, and true nested objects, the description is inadequate. It doesn't explain what kind of operations are performed, what resources are managed, or how the 'research-driven approach' works in practice. The description leaves too many open questions about tool behavior and expected outcomes.

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 schema already documents all parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. It doesn't explain relationships between parameters (e.g., how 'llmInstructions' interacts with 'action') or provide usage examples. The baseline score of 3 reflects adequate schema coverage without description enhancement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'LLM-managed cloud provider operations with research-driven approach' is vague and tautological. It restates the tool name ('llm_cloud_management') without specifying what operations are performed, what resources are affected, or how it differs from sibling tools like 'llm_database_management'. The phrase 'research-driven approach' adds some context but doesn't clarify the core purpose.

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

Usage Guidelines1/5

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

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, appropriate contexts, or exclusions. Given the sibling tools include various analysis, validation, and management tools, there's no indication of when this cloud-specific tool is preferred over others.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tosin2013/mcp-adr-analysis-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server