list_unused_ebs_volumes
Identify and list unattached Amazon EBS volumes to help optimize AWS costs and resource management.
Instructions
Lists EBS volumes that are available (not attached to any instance).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:1660-1677 (handler)Handler for 'list_unused_ebs_volumes' tool: Queries EC2 for volumes with status 'available' (unused/not attached), maps to relevant fields, and returns JSON.if (name === "list_unused_ebs_volumes") { const command = new DescribeVolumesCommand({ Filters: [{ Name: "status", Values: ["available"] }] }); const response = await ec2Client.send(command); const volumes = response.Volumes?.map(v => ({ VolumeId: v.VolumeId, Size: v.Size, Type: v.VolumeType, CreateTime: v.CreateTime, AvailabilityZone: v.AvailabilityZone })) || []; return { content: [{ type: "text", text: JSON.stringify(volumes, null, 2) }] }; }
- src/index.ts:432-438 (registration)Registration of the tool in the ListTools response, including name, description, and empty input schema (no parameters required).name: "list_unused_ebs_volumes", description: "Lists EBS volumes that are available (not attached to any instance).", inputSchema: { type: "object", properties: {} } },