Skip to main content
Glama

get_target_health

Retrieve health status of targets in an AWS Target Group to monitor application availability and troubleshoot load balancing issues.

Instructions

Retrieves the health of targets in a specified Target Group.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
target_group_arnYesThe ARN of the Target Group.

Implementation Reference

  • Handler implementation for the 'get_target_health' tool. It takes a target group ARN, calls DescribeTargetHealthCommand using the ELBv2 client, processes the target health descriptions, and returns a JSON-formatted list of target health statuses.
    if (name === "get_target_health") {
        const tgArn = (args as any)?.target_group_arn;
        const command = new DescribeTargetHealthCommand({ TargetGroupArn: tgArn });
        const response = await elbv2Client.send(command);
        const healths = response.TargetHealthDescriptions?.map(th => ({
            Target: { Id: th.Target?.Id, Port: th.Target?.Port },
            State: th.TargetHealth?.State,
            Reason: th.TargetHealth?.Reason,
            Description: th.TargetHealth?.Description
        })) || [];
        return { content: [{ type: "text", text: JSON.stringify(healths, null, 2) }] };
    }
  • src/index.ts:592-605 (registration)
    Registration of the 'get_target_health' tool in the ListTools response, including name, description, and input schema.
    {
        name: "get_target_health",
        description: "Retrieves the health of targets in a specified Target Group.",
        inputSchema: {
            type: "object",
            properties: {
                target_group_arn: {
                    type: "string",
                    description: "The ARN of the Target Group."
                }
            },
            required: ["target_group_arn"]
        }
    },
  • Input schema definition for the 'get_target_health' tool, specifying the required target_group_arn parameter.
    inputSchema: {
        type: "object",
        properties: {
            target_group_arn: {
                type: "string",
                description: "The ARN of the Target Group."
            }
        },
        required: ["target_group_arn"]
    }
  • Initialization of the ELBv2 client used by the get_target_health handler.
    const elbv2Client = new ElasticLoadBalancingV2Client({});
  • Import of ElasticLoadBalancingV2Client and DescribeTargetHealthCommand (among others) required for the tool implementation.
    import { ElasticLoadBalancingV2Client, DescribeLoadBalancersCommand, DescribeTargetGroupsCommand, DescribeTargetHealthCommand, DescribeListenersCommand, DescribeRulesCommand } from "@aws-sdk/client-elastic-load-balancing-v2";
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool retrieves health data, implying a read-only operation, but doesn't disclose behavioral traits like authentication needs, rate limits, error handling, or what 'health' entails (e.g., metrics, status). This leaves gaps for an AI agent.

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 that front-loads the core purpose without unnecessary details. It earns its place by directly stating what the tool does, making it well-structured and concise.

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

Completeness3/5

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

Given no annotations and no output schema, the description is minimal but covers the basic purpose. For a tool with one parameter and high schema coverage, it's adequate but lacks depth on behavior or output, leaving room for improvement in 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 'target_group_arn' clearly documented in the schema. The description adds no additional meaning beyond implying the ARN specifies the Target Group, aligning with the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Retrieves') and resource ('health of targets in a specified Target Group'), making the purpose evident. However, it doesn't explicitly differentiate from sibling tools like 'list_target_groups' or 'get_service_health', which reduces specificity.

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. While the description implies it's for health monitoring of targets, there's no mention of prerequisites, related tools, or scenarios where other tools might be more appropriate.

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