list_secrets
Retrieve metadata for all active secrets in the Sirr vault, including key names, expiry times, and read counts, without exposing secret values.
Instructions
List all active secrets in the Sirr vault. Returns metadata only — values are never included. Shows key name, expiry time, and read count for each secret.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:670-698 (handler)The handler implementation for the 'list_secrets' tool, which fetches secret metadata from the server and formats it into a list.
case "list_secrets": { const data = await sirrRequest<{ secrets: SecretMeta[] }>( "GET", secretsPath(), ); if (data.secrets.length === 0) { return { content: [{ type: "text" as const, text: "No active secrets." }], }; } const lines = data.secrets.map((m) => { const expiry = formatTtl(m.expires_at); const reads = m.max_reads != null ? `${m.read_count}/${m.max_reads} reads` : `${m.read_count} reads`; return `• ${m.key} — ${expiry} — ${reads}`; }); return { content: [ { type: "text" as const, text: `${data.secrets.length} active secret(s):\n${lines.join("\n")}`, }, ], };