Skip to main content
Glama

list_load_balancers

Retrieve all Application and Network Load Balancers from AWS to monitor and manage traffic distribution across your infrastructure.

Instructions

Lists all Application and Network Load Balancers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the core logic of the 'list_load_balancers' tool by calling AWS Elastic Load Balancing v2 DescribeLoadBalancersCommand and formatting the load balancer details for output.
    if (name === "list_load_balancers") { const command = new DescribeLoadBalancersCommand({}); const response = await elbv2Client.send(command); const lbs = response.LoadBalancers?.map(lb => ({ LoadBalancerName: lb.LoadBalancerName, DNSName: lb.DNSName, Type: lb.Type, Scheme: lb.Scheme, VpcId: lb.VpcId, State: lb.State?.Code, LoadBalancerArn: lb.LoadBalancerArn })) || []; return { content: [{ type: "text", text: JSON.stringify(lbs, null, 2) }] }; }
  • src/index.ts:558-564 (registration)
    The tool registration entry in the ListToolsRequestSchema handler, which defines the tool's name, description, and input schema (empty object).
    name: "list_load_balancers", description: "Lists all Application and Network Load Balancers.", inputSchema: { type: "object", properties: {} } },
  • Initialization of the ElasticLoadBalancingV2Client used by the list_load_balancers handler.
    const elbv2Client = new ElasticLoadBalancingV2Client({});
  • Import of the AWS SDK client and DescribeLoadBalancersCommand used in the tool implementation.
    import { ElasticLoadBalancingV2Client, DescribeLoadBalancersCommand, DescribeTargetGroupsCommand, DescribeTargetHealthCommand, DescribeListenersCommand, DescribeRulesCommand } from "@aws-sdk/client-elastic-load-balancing-v2";

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