Skip to main content
Glama

list_internet_gateways

List and view attachments for Internet Gateways in AWS to manage network connectivity and routing configurations.

Instructions

Lists Internet Gateways and their attachments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler function that executes the list_internet_gateways tool by calling DescribeInternetGatewaysCommand on EC2 client and formatting the response.
    if (name === "list_internet_gateways") { const command = new DescribeInternetGatewaysCommand({}); const response = await ec2Client.send(command); const igws = response.InternetGateways?.map(igw => ({ InternetGatewayId: igw.InternetGatewayId, Attachments: igw.Attachments, Name: igw.Tags?.find(t => t.Key === "Name")?.Value })) || []; return { content: [{ type: "text", text: JSON.stringify(igws, null, 2) }] }; }
  • src/index.ts:322-329 (registration)
    Registration of the list_internet_gateways tool in the ListTools response, including description and empty input schema.
    { name: "list_internet_gateways", description: "Lists Internet Gateways and their attachments.", inputSchema: { type: "object", properties: {} } },
  • Input schema for list_internet_gateways tool (empty object).
    inputSchema: { type: "object", properties: {} }
  • Import of DescribeInternetGatewaysCommand used by the tool.
    import { EC2Client, DescribeInstancesCommand, DescribeSecurityGroupsCommand, DescribeAddressesCommand, DescribeVolumesCommand, DescribeVpcsCommand, DescribeSubnetsCommand, DescribeRouteTablesCommand, DescribeInternetGatewaysCommand, DescribeNatGatewaysCommand } from "@aws-sdk/client-ec2";
  • EC2 client instance used by the tool handler.
    const ec2Client = new EC2Client({});

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/Bhavesh8890/MCP-server'

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