keyway_list_secrets
Retrieve secret names from the Keyway vault for a specified repository environment, returning only identifiers without exposing sensitive values.
Instructions
List all secret names in the Keyway vault for the current repository. Returns only the keys, not the values.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| environment | No | Environment to list secrets from (default: "development") |
Implementation Reference
- src/tools/list-secrets.ts:12-33 (handler)The handler function that retrieves, parses, and returns the list of secrets for the specified environment.
export async function listSecrets(args: { environment?: string }): Promise<CallToolResult> { const token = await getToken(); const repository = getRepository(); const environment = args.environment || 'development'; const content = await pullSecrets(repository, environment, token); const secrets = parseEnvContent(content); const keys = Object.keys(secrets).sort(); return { content: [ { type: 'text', text: JSON.stringify( { repository, environment, count: keys.length, secrets: keys }, null, 2 ), }, ], }; } - src/index.ts:24-34 (registration)Tool registration for 'keyway_list_secrets' in the main index file, mapping it to the 'listSecrets' handler.
server.tool( 'keyway_list_secrets', 'List all secret names in the Keyway vault for the current repository. Returns only the keys, not the values.', { environment: z .string() .optional() .describe('Environment to list secrets from (default: "development")'), }, async (args) => listSecrets(args) );