update-secret
Modify existing secrets in SecureCode's vault by updating values, descriptions, tags, or domains while maintaining encryption and audit logging.
Instructions
Update an existing secret's value, description, tags, or domain. Only provided fields are changed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The name of the secret to update | |
| value | No | New secret value (omit to keep current value) | |
| description | No | New description | |
| tags | No | New tags (replaces ALL existing tags) | |
| domain | No | New domain | |
| filterTags | No | Filter tags to disambiguate same-name secrets (different from the "tags" field which sets new tags) |
Implementation Reference
- src/index.ts:528-548 (handler)Handler for the 'update-secret' tool. It uses the SecureCodeClient to update a secret's metadata or value and wraps the result for the MCP server.
// Tool: update-secret server.tool( 'update-secret', 'Update an existing secret\'s value, description, tags, or domain. Only provided fields are changed.', { name: z.string().describe('The name of the secret to update'), value: z.string().optional().describe('New secret value (omit to keep current value)'), description: z.string().optional().describe('New description'), tags: z.record(z.string(), z.string()).optional().describe('New tags (replaces ALL existing tags)'), domain: z.string().optional().describe('New domain'), filterTags: z.record(z.string(), z.string()).optional().describe('Filter tags to disambiguate same-name secrets (different from the "tags" field which sets new tags)'), }, async ({ name, value, description, tags, domain, filterTags }) => { try { const secret = await getClient().updateSecret(name, { value, description, tags, domain }, filterTags); return wrapResponse([{ type: 'text', text: `Secret "${secret.name}" updated successfully` }]); } catch (error) { return errorResult(error); } } );