Update Secret Fields
update_secret_fieldsUpdates non-sensitive fields on an existing secret with read-mutate-verify checks and an audit comment, blocking password-class fields by default.
Instructions
Edit non-sensitive fields on an existing secret.
Composes the read-mutate-verify flow:
GET /v1/secrets/{id}/summaryto check approval / comment requirements via :func:_check_secret_approval.GET /v1/secrets/{id}(template lookup) to identify which slugs are password fields.PUT /v1/secrets/{id}/fields/{slug}per entry in field_updates.GET /v1/secrets/{id}/summaryfor verification.
By default, slugs whose template field has isPassword=True are
refused — the model should not see plaintext password values. Use
:func:set_secret_field_environment_variable (which emits a shell
script that reads the value locally and PUTs it without the value
ever passing through the model) for password-class fields, or set
allow_password_fields=True to override (not recommended).
Parameters
secret_id:
Identifier of the secret to update.
field_updates:
Mapping of field_slug -> new_value (or a JSON string). Use
slugs (e.g. "notes", "url", "hostname") discoverable
via :func:check_secret_template.
comment:
Audit comment recorded against each field update. Required when
the secret has requiresComment or requiresApproval set.
Must explain why the change is being made and reference any
related ticket, incident, or change request.
allow_password_fields:
Set to True to permit updating password-class fields. Doing
so means the new value passes through the model — prefer
:func:set_secret_field_environment_variable for those fields.
Returns
dict
{"result": {...}, "verification": {...}} where result lists
per-field outcomes and verification is the post-update summary.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"secret_id": "<secret_id>",
"field_updates": "<field_updates>"
},
"name": "update_secret_fields"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment | No | ||
| secret_id | Yes | ||
| field_updates | Yes | ||
| allow_password_fields | No |