sirr_key_list
List all API keys for the current principal without exposing key values, enabling secure metadata-only secret management.
Instructions
List all API keys for the current principal. Key values are never returned.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:886-915 (handler)The handler logic for 'sirr_key_list' which fetches API keys from '/me' and formats the output.
case "sirr_key_list": { const me = await sirrRequest<{ keys: Array<{ id: string; name: string; valid_after: number; valid_before: number; created_at: number; }>; }>("GET", "/me"); if (!me.keys || me.keys.length === 0) { return { content: [{ type: "text" as const, text: "No API keys." }], }; } const lines = me.keys.map( (k) => `• ${k.id} — ${k.name} (expires ${new Date(k.valid_before * 1000).toISOString()})`, ); return { content: [ { type: "text" as const, text: `${me.keys.length} API key(s):\n${lines.join("\n")}`, }, ], }; - src/index.ts:364-371 (schema)Registration and schema definition for the 'sirr_key_list' tool.
{ name: "sirr_key_list", description: "List all API keys for the current principal. Key values are never returned.", inputSchema: { type: "object" as const, properties: {}, }, },