list_cloudformation_stacks
Retrieve and display AWS CloudFormation stacks along with their current operational status for monitoring and management purposes.
Instructions
Lists CloudFormation stacks and their status.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2285-2295 (handler)Handler function that lists CloudFormation stacks using ListStacksCommand with specific status filters, maps the response, and returns JSON.if (name === "list_cloudformation_stacks") { const command = new ListStacksCommand({ StackStatusFilter: ["CREATE_COMPLETE", "UPDATE_COMPLETE", "ROLLBACK_COMPLETE", "CREATE_IN_PROGRESS", "UPDATE_IN_PROGRESS"] }); const response = await cfnClient.send(command); const stacks = response.StackSummaries?.map(s => ({ StackName: s.StackName, StackStatus: s.StackStatus, DriftInformation: s.DriftInformation, CreationTime: s.CreationTime })) || []; return { content: [{ type: "text", text: JSON.stringify(stacks, null, 2) }] }; }
- src/index.ts:768-771 (registration)Tool registration in ListToolsRequestSchema, defining name, description, and empty input schema.name: "list_cloudformation_stacks", description: "Lists CloudFormation stacks and their status.", inputSchema: { "type": "object", "properties": {} } },
- src/index.ts:770-771 (schema)Input schema definition: empty object, no parameters required.inputSchema: { "type": "object", "properties": {} } },
- src/index.ts:77-77 (helper)CloudFormationClient instantiation used by the handler.const cfnClient = new CloudFormationClient({});
- src/index.ts:44-44 (helper)Import of CloudFormationClient and ListStacksCommand.import { CloudFormationClient, ListStacksCommand } from "@aws-sdk/client-cloudformation";