Skip to main content
Glama

list_ecs_services

Retrieve services within an ECS cluster to monitor and manage containerized applications in AWS.

Instructions

Lists services in a specific ECS cluster.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
clusterYesThe name or ARN of the ECS cluster.

Implementation Reference

  • Handler function that lists ECS services in the specified cluster. Uses ListServicesCommand to get service ARNs, then DescribeServicesCommand for details like status, counts, and task definition. Limits to first 10 services.
        const cluster = (args as any).cluster;
        const command = new ListServicesCommand({ cluster });
        const response = await ecsClient.send(command);
    
        const services = response.serviceArns || [];
        if (services.length === 0) return { content: [{ type: "text", text: "[]" }] };
    
        // Describe for more info
        const batch = services.slice(0, 10);
        const descCommand = new DescribeServicesCommand({ cluster, services: batch });
        const descResponse = await ecsClient.send(descCommand);
    
        const serviceDetails = descResponse.services?.map(s => ({
            serviceName: s.serviceName,
            status: s.status,
            desiredCount: s.desiredCount,
            runningCount: s.runningCount,
            pendingCount: s.pendingCount,
            taskDefinition: s.taskDefinition
        })) || [];
    
        return { content: [{ type: "text", text: JSON.stringify(serviceDetails, null, 2) }] };
    }
  • src/index.ts:722-731 (registration)
    Tool registration in the ListToolsRequestSchema response array, defining the tool name, description, and input schema requiring a 'cluster' parameter.
        description: "Lists services in a specific ECS cluster.",
        inputSchema: {
            type: "object",
            properties: {
                cluster: { "type": "string", "description": "The name or ARN of the ECS cluster." }
            },
            required: ["cluster"]
        }
    },
    {
  • Input schema for the list_ecs_services tool, specifying an object with a required 'cluster' string parameter.
            type: "object",
            properties: {
                cluster: { "type": "string", "description": "The name or ARN of the ECS cluster." }
            },
            required: ["cluster"]
        }
    },
  • Import of ECSClient and relevant commands (ListServicesCommand, DescribeServicesCommand) used by the list_ecs_services handler.
    import { ECSClient, ListClustersCommand, ListServicesCommand, DescribeClustersCommand, DescribeServicesCommand } from "@aws-sdk/client-ecs";
  • Initialization of the shared ECSClient instance used by the handler.
    const ecsClient = new ECSClient({});
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool lists services but doesn't describe behavioral traits such as pagination, rate limits, authentication requirements, error handling, or output format. For a read operation with zero annotation coverage, this is a significant gap in transparency.

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: 'Lists services in a specific ECS cluster.' It is front-loaded with the core action and resource, with zero wasted words or redundancy. This makes it easy for an agent to parse and understand quickly.

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 the tool's complexity (a read operation with one parameter) and the absence of annotations and output schema, the description is incomplete. It lacks details on behavioral aspects (e.g., pagination, error handling) and doesn't compensate for the missing output schema by describing return values. This leaves gaps for an agent to use the tool effectively.

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?

The input schema has 100% description coverage, with the single parameter 'cluster' documented as 'The name or ARN of the ECS cluster.' The description adds no additional meaning beyond this, such as examples or constraints. According to the rules, with high schema coverage (>80%), the baseline score is 3, which is appropriate here.

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 tool's purpose: 'Lists services in a specific ECS cluster.' It specifies the verb ('Lists') and resource ('services in a specific ECS cluster'), making the action and target unambiguous. However, it doesn't distinguish this tool from its sibling 'list_ecs_clusters' or other listing tools, which prevents a perfect score.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing cluster access), exclusions, or comparisons to similar tools like 'list_ecs_clusters' or other AWS service listing tools. This lack of contextual guidance leaves the agent to infer usage scenarios independently.

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