Skip to main content
Glama

list_target_groups

Retrieve all AWS Target Groups to manage application traffic routing and load balancing configurations.

Instructions

Lists all Target Groups.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
load_balancer_arnNoOptional: Filter by Load Balancer ARN.

Implementation Reference

  • Handler implementation for the 'list_target_groups' tool. Calls AWS ELBv2 DescribeTargetGroupsCommand, optionally filtered by LoadBalancerArn, and maps the response to a simplified JSON output.
    if (name === "list_target_groups") {
        const lbArn = (args as any)?.load_balancer_arn;
        const command = new DescribeTargetGroupsCommand(lbArn ? { LoadBalancerArn: lbArn } : {});
        const response = await elbv2Client.send(command);
        const tgs = response.TargetGroups?.map(tg => ({
            TargetGroupName: tg.TargetGroupName,
            Protocol: tg.Protocol,
            Port: tg.Port,
            TargetType: tg.TargetType,
            TargetGroupArn: tg.TargetGroupArn,
            LoadBalancerArns: tg.LoadBalancerArns
        })) || [];
        return { content: [{ type: "text", text: JSON.stringify(tgs, null, 2) }] };
    }
  • src/index.ts:565-577 (registration)
    Tool registration in the ListTools handler, defining the tool name, description, and input schema for 'list_target_groups'.
    {
        name: "list_target_groups",
        description: "Lists all Target Groups.",
        inputSchema: {
            type: "object",
            properties: {
                load_balancer_arn: {
                    type: "string",
                    description: "Optional: Filter by Load Balancer ARN."
                }
            }
        }
    },
  • Input schema definition for the 'list_target_groups' tool, specifying optional load_balancer_arn parameter.
    {
        name: "list_target_groups",
        description: "Lists all Target Groups.",
        inputSchema: {
            type: "object",
            properties: {
                load_balancer_arn: {
                    type: "string",
                    description: "Optional: Filter by Load Balancer ARN."
                }
            }
        }
    },
Behavior2/5

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

With no annotations, the description carries full burden but only states the action without behavioral details. It doesn't disclose if this is a read-only operation, requires permissions, has rate limits, returns paginated results, or includes metadata like ARNs. This is inadequate for a tool with potential complexity.

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

Conciseness5/5

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

The description is a single, efficient sentence with no wasted words, making it front-loaded and easy to parse. It directly states the tool's function without unnecessary elaboration.

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 no annotations, no output schema, and a simple parameter, the description is incomplete. It doesn't cover behavioral aspects like safety, permissions, or result format, which are crucial for an AI agent to use this tool effectively in an AWS context.

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%, with the parameter 'load_balancer_arn' documented as optional for filtering. The description adds no additional meaning beyond the schema, such as format examples or filtering implications, so it meets the baseline for high schema coverage.

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 'Lists all Target Groups' clearly states the verb ('Lists') and resource ('Target Groups'), providing a basic purpose. However, it lacks specificity about scope (e.g., AWS region, account) and doesn't distinguish from siblings like 'list_load_balancers' or 'get_target_health', making it vague in context.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites, context (e.g., AWS environment), or compare to sibling tools like 'get_target_health' for health status or 'list_load_balancers' for related resources, leaving usage unclear.

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

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