Skip to main content
Glama

ec2-describe_instances

Retrieve detailed information about AWS EC2 instances for inventory management, monitoring, and troubleshooting with advanced filtering and pagination capabilities.

Instructions

Retrieve detailed information about EC2 instances with advanced filtering and pagination.

This tool provides comprehensive instance data including state, type, networking, tags, and configuration.
Essential for inventory management, monitoring, and troubleshooting EC2 infrastructure.

**Required Parameters:**
- profile_name (str): AWS profile name from ~/.aws/credentials
- region (str): AWS region (e.g., 'us-east-1', 'eu-west-1')

**Optional Parameters:**
- instance_ids (List[str]): Specific instance IDs to retrieve
  Example: ['i-1234567890abcdef0', 'i-0987654321fedcba0']

- filters (Dict[str, Any]): Advanced filtering options
  **Instance State Filters:**
  - 'instance-state-name': ['pending', 'running', 'shutting-down', 'terminated', 'stopping', 'stopped']

  **Instance Type Filters:**
  - 'instance-type': ['t2.micro', 't3.small', 'm5.large', 'c5.xlarge']

  **Network Filters:**
  - 'vpc-id': ['vpc-12345678'] - Filter by VPC
  - 'subnet-id': ['subnet-12345678'] - Filter by subnet
  - 'private-ip-address': ['10.0.1.100'] - Filter by private IP
  - 'public-ip-address': ['54.123.45.67'] - Filter by public IP

  **Tag Filters:**
  - 'tag:Name': ['web-server', 'database'] - Filter by Name tag
  - 'tag:Environment': ['production', 'staging'] - Filter by Environment tag
  - 'tag-key': ['Owner'] - Filter by tag key existence

  **Security and Compliance:**
  - 'security-group-id': ['sg-12345678'] - Filter by security group
  - 'key-name': ['my-key-pair'] - Filter by key pair
  - 'monitoring-state': ['enabled', 'disabled'] - Filter by detailed monitoring

  **Architecture Filters:**
  - 'architecture': ['i386', 'x86_64', 'arm64'] - Filter by architecture
  - 'root-device-type': ['ebs', 'instance-store'] - Filter by root device type
  - 'virtualization-type': ['hvm', 'paravirtual'] - Filter by virtualization

- max_results (int): Limit results (1-1000). Default: no limit
- next_token (str): Pagination token from previous request

**Common Use Cases:**
1. List all running instances: filters={'instance-state-name': ['running']}
2. Find instances by tag: filters={'tag:Environment': ['production']}
3. Get instances in specific VPC: filters={'vpc-id': ['vpc-12345678']}
4. Find instances by type: filters={'instance-type': ['t3.micro', 't3.small']}
5. Security audit: filters={'security-group-id': ['sg-12345678']}

**Response includes:** Instance ID, state, type, AMI ID, key name, launch time,
networking details, security groups, tags, monitoring state, and more.

Use pagination with max_results and next_token for large environments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionYes
profile_nameNodefault
instance_idsNo
filtersNo
max_resultsNo
next_tokenNo
Behavior4/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 effectively describes key behaviors: pagination behavior ('Use pagination with max_results and next_token for large environments'), filtering capabilities (extensive filter examples), and response content ('Response includes: Instance ID, state, type, AMI ID, key name...'). It doesn't mention rate limits, authentication requirements beyond parameters, or error handling, but provides substantial operational context.

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

Conciseness3/5

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

The description is well-structured with clear sections (purpose, parameters, use cases, response), but is quite lengthy with extensive filter examples that could be condensed. While all content is relevant, some redundancy exists (e.g., filter categories could be summarized more concisely). The core purpose is front-loaded appropriately, but overall length exceeds what's strictly necessary.

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

Completeness4/5

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

Given the tool's complexity (6 parameters, no annotations, no output schema), the description provides substantial context: clear purpose, detailed parameter semantics, usage examples, and response content. It effectively compensates for the lack of structured metadata. The main gap is the absence of explicit error handling information or authentication prerequisites beyond the profile_name parameter.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description fully compensates by providing comprehensive parameter documentation. It clearly distinguishes required vs. optional parameters, provides examples (e.g., region format 'us-east-1'), enumerates filter options with detailed categories and values, explains max_results range (1-1000) and default behavior, and documents next_token purpose. This adds substantial meaning beyond the bare schema.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Retrieve detailed information about EC2 instances with advanced filtering and pagination.' It specifies the verb ('retrieve'), resource ('EC2 instances'), and key capabilities ('advanced filtering and pagination'), distinguishing it from siblings like ec2-describe_security_groups or ec2-describe_vpcs that focus on different AWS resources.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Essential for inventory management, monitoring, and troubleshooting EC2 infrastructure') and includes 'Common Use Cases' section with five specific examples. However, it doesn't explicitly state when NOT to use this tool or mention direct alternatives among sibling tools (e.g., when to use ec2-describe_security_groups instead).

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/Havoc24k/aws-sa-tools-mcp-server'

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