Create Secret with Generated Password
create_secret_with_generated_passwordCreates a new secret, generates its password using the template's password requirements, and returns only the secret ID and safe metadata—never the password.
Instructions
Create a new secret with a server-generated password.
The password is generated by the Delinea API using the template field's password requirements and is never returned to the caller. The model receives only the secret's ID and safe metadata.
Before calling, use check_secret_template(template_id) to discover:
Which fields exist and their
secretTemplateFieldIdvalues.Which fields have
isPassword=True(use their ID as password_field_id).Which fields have
isRequired=True(must be provided in items).
Parameters
name:
Display name for the new secret.
secret_template_id:
Template ID that defines the secret structure.
password_field_id:
secretTemplateFieldId of the password field on the template.
Used to call POST /v1/secret-templates/generate-password/{id}.
items:
Non-password field values as a list of RestSecretItem dicts (or
a JSON string). Each dict should contain fieldId and
itemValue. An entry for the password field may be omitted or
have an empty itemValue — the generated password will be
injected automatically.
folder_id:
Optional folder to store the secret in.
site_id:
Optional distributed engine site identifier.
comment:
Audit comment recorded against the new secret. Must explain
why this secret is being created and, if the action is tied
to a formal request (e.g. a Jira ticket, incident, or change
request), that reference must be included.
Returns
dict
{"result": {...}, "verification": {...}} with safe metadata
only. The password value is never included.
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": {
"name": "<name>",
"secret_template_id": "<secret_template_id>",
"password_field_id": "<password_field_id>",
"items": "<items>"
},
"name": "create_secret_with_generated_password"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| items | Yes | ||
| comment | No | ||
| site_id | No | ||
| folder_id | No | ||
| password_field_id | Yes | ||
| secret_template_id | Yes |