Skip to main content
Glama
eunyuljo

aws-helper MCP Server

by eunyuljo

get_ec2_summary

Retrieve summary information for EC2 instances in a specified AWS region to monitor resources and manage configurations.

Instructions

EC2 인스턴스 요약 정보를 제공합니다

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoAWS 리전ap-northeast-2

Implementation Reference

  • The handler function that implements the get_ec2_summary tool. It creates an EC2 client, describes all instances, tallies counts by state (running, stopped, etc.) and by instance type, then returns a formatted markdown summary text.
    async function getEC2Summary(args: any) {
      const region = args?.region || 'ap-northeast-2';
      const client = new EC2Client({ region });
      
      const command = new DescribeInstancesCommand({});
      const response = await client.send(command);
      
      const summary = {
        total: 0,
        running: 0,
        stopped: 0,
        pending: 0,
        terminated: 0,
        byType: {} as Record<string, number>
      };
      
      for (const reservation of response.Reservations || []) {
        for (const instance of reservation.Instances || []) {
          summary.total++;
          
          const state = instance.State?.Name || 'unknown';
          if (state === 'running') summary.running++;
          else if (state === 'stopped') summary.stopped++;
          else if (state === 'pending') summary.pending++;
          else if (state === 'terminated') summary.terminated++;
          
          const type = instance.InstanceType || 'unknown';
          summary.byType[type] = (summary.byType[type] || 0) + 1;
        }
      }
      
      return {
        content: [
          {
            type: 'text',
            text: `📈 EC2 인스턴스 요약 (${region})\n\n` +
                  `**상태별 현황:**\n` +
                  `• 전체: ${summary.total}개\n` +
                  `• 실행 중: ${summary.running}개\n` +
                  `• 중지됨: ${summary.stopped}개\n` +
                  `• 시작 중: ${summary.pending}개\n` +
                  `• 종료됨: ${summary.terminated}개\n\n` +
                  `**인스턴스 타입별:**\n` +
                  Object.entries(summary.byType)
                    .sort(([,a], [,b]) => b - a)
                    .map(([type, count]) => `• ${type}: ${count}개`)
                    .join('\n')
          }
        ]
      };
    }
  • The input schema for the get_ec2_summary tool, defining an optional 'region' parameter with default 'ap-northeast-2'.
    inputSchema: {
      type: 'object',
      properties: {
        region: {
          type: 'string',
          description: 'AWS 리전',
          default: 'ap-northeast-2'
        }
      }
    }
  • src/index.ts:55-68 (registration)
    Registration of the get_ec2_summary tool in the ListToolsRequest handler response, specifying name, description, and input schema.
    {
      name: 'get_ec2_summary',
      description: 'EC2 인스턴스 요약 정보를 제공합니다',
      inputSchema: {
        type: 'object',
        properties: {
          region: {
            type: 'string',
            description: 'AWS 리전',
            default: 'ap-northeast-2'
          }
        }
      }
    },
  • src/index.ts:96-97 (registration)
    Registration/mapping of tool name to handler in the CallToolRequest switch dispatcher.
    case 'get_ec2_summary':
      return await getEC2Summary(args);
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 states the tool 'provides' information but doesn't clarify whether this is a read-only operation, what permissions might be required, whether it makes API calls that could incur costs, or what format the summary information takes. For an AWS tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 extremely concise - a single Korean sentence that directly states the tool's function. There's no wasted language or unnecessary elaboration. While it could benefit from being more informative, it's efficiently structured without redundancy.

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 tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what 'summary information' includes, doesn't provide context about AWS authentication requirements, and offers no guidance on when to use this versus the sibling 'get_ec2_instances' tool. The agent would struggle to understand what to expect from this tool's output or when to select it.

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?

The schema has 100% description coverage with the single 'region' parameter well-documented in the schema itself. The description adds no parameter information beyond what's already in the structured schema. According to scoring rules, when schema_description_coverage is high (>80%), the baseline is 3 even with no parameter information in the description.

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 states the tool provides EC2 instance summary information, which gives a basic purpose. However, it's somewhat vague about what 'summary information' includes and doesn't distinguish this tool from its sibling 'get_ec2_instances' which likely provides more detailed instance data. The description doesn't specify the verb or scope clearly enough for optimal differentiation.

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 provides no guidance on when to use this tool versus alternatives. There's no mention of when this summary tool is preferable to the more detailed 'get_ec2_instances' sibling, nor any context about prerequisites or appropriate use cases. The agent receives no help in choosing between available AWS tools.

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/eunyuljo/sample-mcp-server-with-claude-desktop'

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