renew-secret
Renew expired secrets or change their expiration time in the SecureCode vault. Reactivate expired credentials or extend their TTL to maintain access.
Instructions
Renew an expired secret or change its TTL. Use this to reactivate expired secrets or extend expiration.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the secret to renew | |
| ttlHours | No | New TTL in hours. Omit to make permanent (no expiry) | |
| tags | No | Filter tags to disambiguate same-name secrets |
Implementation Reference
- src/index.ts:491-508 (handler)The handler for the 'renew-secret' tool, which calls the client's `renewSecret` method to update a secret's TTL or renew an expired one.
// Tool: renew-secret server.tool( 'renew-secret', 'Renew an expired secret or change its TTL. Use this to reactivate expired secrets or extend expiration.', { name: z.string().describe('The name of the secret to renew'), ttlHours: z.number().positive().optional().describe('New TTL in hours. Omit to make permanent (no expiry)'), tags: z.record(z.string(), z.string()).optional().describe('Filter tags to disambiguate same-name secrets'), }, async ({ name, ttlHours, tags }) => { try { const secret = await getClient().renewSecret(name, ttlHours, tags); return wrapResponse([{ type: 'text', text: `Secret "${secret.name}" renewed successfully${ttlHours ? ` (expires in ${ttlHours}h)` : ' (permanent)'}` }]); } catch (error) { return errorResult(error); } } );