list_secrets
Retrieve names of AWS Secrets Manager secrets to manage sensitive data access and configuration across cloud applications.
Instructions
Lists Secrets Manager secrets (names only).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:2270-2275 (handler)Handler function that executes the list_secrets tool: sends ListSecretsCommand to SecretsManagerClient and formats response with secret names and descriptions.if (name === "list_secrets") { const command = new ListSecretsCommand({}); const response = await secretsManagerClient.send(command); const secrets = response.SecretList?.map(s => ({ Name: s.Name, Description: s.Description })) || []; return { content: [{ type: "text", text: JSON.stringify(secrets, null, 2) }] }; }
- src/index.ts:758-761 (registration)Registers the list_secrets tool in the ListTools response, including name, description, and input schema (no parameters).name: "list_secrets", description: "Lists Secrets Manager secrets (names only).", inputSchema: { "type": "object", "properties": {} } },
- src/index.ts:75-75 (helper)Initializes the SecretsManagerClient instance used by the list_secrets handler.const secretsManagerClient = new SecretsManagerClient({});
- src/index.ts:42-42 (helper)Imports the SecretsManagerClient class and ListSecretsCommand used for list_secrets implementation.import { SecretsManagerClient, ListSecretsCommand } from "@aws-sdk/client-secrets-manager";