Skip to main content
Glama
code-alchemist01

MCP Cloud Services Server

scan_security_issues

Scan cloud resources for security issues to identify vulnerabilities and ensure compliance across AWS, Azure, and GCP environments.

Instructions

Scan cloud resources for security issues

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
providerYesCloud provider
resourceIdNoSpecific resource ID to scan (optional)

Implementation Reference

  • Core handler logic for the 'scan_security_issues' tool. Generates mock security findings based on provider and optional resourceId, then formats the output.
    case 'scan_security_issues': {
      const resourceId = params.resourceId as string | undefined;
    
      // Simplified security scanning
      const findings: SecurityFinding[] = [
        {
          id: '1',
          severity: 'medium',
          title: 'Public S3 Bucket Detected',
          description: 'Some S3 buckets may be publicly accessible',
          resourceId: resourceId || 'all',
          resourceType: 'storage',
          provider,
          recommendation: 'Review bucket policies and ensure proper access controls',
          detectedAt: new Date(),
          category: 'access-control',
        },
        {
          id: '2',
          severity: 'high',
          title: 'Unencrypted Storage',
          description: 'Storage resources without encryption detected',
          resourceId: resourceId || 'all',
          resourceType: 'storage',
          provider,
          recommendation: 'Enable encryption at rest for all storage resources',
          detectedAt: new Date(),
          category: 'encryption',
        },
      ];
    
      return Formatters.formatSecurityFindings(findings);
    }
  • Tool schema definition including name, description, and inputSchema for validation.
    {
      name: 'scan_security_issues',
      description: 'Scan cloud resources for security issues',
      inputSchema: {
        type: 'object',
        properties: {
          provider: {
            type: 'string',
            enum: ['aws', 'azure', 'gcp'],
            description: 'Cloud provider',
          },
          resourceId: {
            type: 'string',
            description: 'Specific resource ID to scan (optional)',
          },
        },
        required: ['provider'],
      },
    },
  • src/server.ts:19-27 (registration)
    Registration of securityTools (containing scan_security_issues) into the combined allTools list used for tool listing.
    const allTools = [
      ...awsTools,
      ...azureTools,
      ...gcpTools,
      ...resourceManagementTools,
      ...costAnalysisTools,
      ...monitoringTools,
      ...securityTools,
    ];
  • src/server.ts:76-78 (registration)
    Dispatch registration: routes calls to tools in securityTools (including scan_security_issues) to the handleSecurityTool function.
    } else if (securityTools.some((t) => t.name === name)) {
      result = await handleSecurityTool(name, args || {});
    } else {
  • Helper function used by the handler to format security findings into a markdown report.
    static formatSecurityFindings(findings: SecurityFinding[]): string {
      let output = `# Security Findings\n\n`;
      output += `**Total Findings:** ${findings.length}\n\n`;
    
      const bySeverity = {
        critical: findings.filter((f) => f.severity === 'critical'),
        high: findings.filter((f) => f.severity === 'high'),
        medium: findings.filter((f) => f.severity === 'medium'),
        low: findings.filter((f) => f.severity === 'low'),
      };
    
      output += `- Critical: ${bySeverity.critical.length}\n`;
      output += `- High: ${bySeverity.high.length}\n`;
      output += `- Medium: ${bySeverity.medium.length}\n`;
      output += `- Low: ${bySeverity.low.length}\n\n`;
    
      if (findings.length > 0) {
        output += '## Findings\n\n';
        for (const finding of findings.slice(0, 20)) {
          const severityIcon = {
            critical: '🔴',
            high: '🟠',
            medium: '🟡',
            low: '🟢',
          }[finding.severity];
    
          output += `### ${severityIcon} ${finding.title}\n\n`;
          output += `- **Severity:** ${finding.severity}\n`;
          output += `- **Provider:** ${finding.provider.toUpperCase()}\n`;
          output += `- **Resource:** ${finding.resourceId}\n`;
          output += `- **Type:** ${finding.resourceType}\n`;
          output += `- **Description:** ${finding.description}\n`;
          output += `- **Recommendation:** ${finding.recommendation}\n`;
          output += `- **Detected:** ${finding.detectedAt.toISOString()}\n\n`;
        }
        if (findings.length > 20) {
          output += `\n... and ${findings.length - 20} more findings\n`;
        }
      }
    
      return output;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'scan' but doesn't specify whether this is a read-only operation, if it requires specific permissions, its impact on resources (e.g., performance), or what the output entails (e.g., report format, alerts). This leaves critical behavioral traits unclear for a security tool.

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 that directly states the tool's function without unnecessary words. It's front-loaded and to the point, though it could be slightly more informative without sacrificing brevity.

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?

Given the complexity of a security scanning tool with no annotations and no output schema, the description is insufficient. It lacks details on behavioral traits, output format, and usage context, making it incomplete for an agent to understand the tool's full scope and implications.

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 both parameters ('provider' and 'resourceId') with descriptions and enum values. The description adds no additional meaning beyond the schema, such as explaining what 'security issues' entail or how parameters affect the scan. Baseline 3 is appropriate as the schema handles the heavy lifting.

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

Purpose3/5

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

The description 'Scan cloud resources for security issues' clearly states the action (scan) and target (cloud resources for security issues), providing a basic purpose. However, it doesn't differentiate from sibling tools like 'check_compliance' or 'check_encryption' that might have overlapping security-related functions, making it somewhat vague in comparison.

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

Usage Guidelines2/5

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

The description offers no guidance on when to use this tool versus alternatives. With siblings like 'check_compliance' and 'check_encryption', there's no indication of whether this is a broader scan, a specific type of security check, or how it relates to other tools, leaving the agent without usage context.

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/code-alchemist01/Cloud-mcp_server'

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