Skip to main content
Glama

list_ecs_clusters

Retrieve a list of Amazon ECS clusters with their current status and running task counts for monitoring and management.

Instructions

Lists ECS clusters with their status and running task counts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that implements the list_ecs_clusters tool logic using ECSClient, ListClustersCommand, and DescribeClustersCommand to list clusters with status and task counts.
    if (name === "list_ecs_clusters") {
        const command = new ListClustersCommand({});
        const response = await ecsClient.send(command);
        // Detail describe to get task counts
        const clusters = response.clusterArns || [];
        if (clusters.length === 0) return { content: [{ type: "text", text: "[]" }] };
    
        const descParams = { clusters: clusters };
        const descCommand = new DescribeClustersCommand(descParams);
        const descResponse = await ecsClient.send(descCommand);
    
        const clusterDetails = descResponse.clusters?.map(c => ({
            clusterName: c.clusterName,
            status: c.status,
            runningTasksCount: c.runningTasksCount,
            pendingTasksCount: c.pendingTasksCount,
            activeServicesCount: c.activeServicesCount
        })) || [];
    
        return { content: [{ type: "text", text: JSON.stringify(clusterDetails, null, 2) }] };
    }
  • src/index.ts:716-719 (registration)
    Registration of the 'list_ecs_clusters' tool in the ListToolsRequestSchema handler, including its description and input schema (no parameters).
        name: "list_ecs_clusters",
        description: "Lists ECS clusters with their status and running task counts.",
        inputSchema: { "type": "object", "properties": {} }
    },
  • Input schema definition for the list_ecs_clusters tool (empty object, no required parameters).
    inputSchema: { "type": "object", "properties": {} }
  • Initialization of the ECSClient instance used by the list_ecs_clusters handler.
    const ecsClient = new ECSClient({});
  • Import of necessary AWS SDK classes for ECS operations, including those used by list_ecs_clusters.
    import { ECSClient, ListClustersCommand, ListServicesCommand, DescribeClustersCommand, DescribeServicesCommand } from "@aws-sdk/client-ecs";
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the output includes 'status and running task counts', which adds some context about what data is returned, but fails to cover critical aspects like pagination, rate limits, authentication requirements, error handling, or whether it lists all clusters or requires filtering. This leaves significant gaps for a tool in a cloud environment.

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, well-structured sentence that front-loads the core action and resource, followed by specific output details. It wastes no words and is appropriately sized for a simple list tool, earning full marks for conciseness.

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 the tool's low complexity (0 parameters, no output schema, no annotations), the description is minimally adequate by covering the purpose and output attributes. However, it lacks completeness for operational use in AWS ECS, such as mentioning region scoping, permission needs, or how to handle large result sets, which are common in cloud list operations.

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

Parameters4/5

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

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately avoids discussing parameters, focusing instead on the tool's output semantics, which is efficient and adds value beyond the schema.

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 ('Lists') and resource ('ECS clusters') with specific attributes ('status and running task counts'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'list_ecs_services' or 'list_eks_clusters', which would require mentioning ECS-specific clustering versus services or EKS clusters.

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, such as 'list_ecs_services' for service-level details or 'list_eks_clusters' for Kubernetes clusters. The description lacks context about prerequisites, permissions, or typical use cases, offering minimal usage direction.

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