Add or Replace a Workflow Recipe
publish_workflow_recipeAdds one workflow recipe to a playbook the user owns and writes a new version. Recipes are keyed by name: an identical recipe changes nothing (unchanged: true) unless sensitivity or acknowledgedTerms is passed; a different recipe with the same name is refused unless mode is "replace". playbookId may be omitted only when the user owns one playbook. Secret-shaped values are refused; sensitive vocabulary raises the sensitivity unless each term is in acknowledgedTerms. Returns the new version, privacyWarnings for this recipe and acknowledgeable terms ([{itemName, terms}]). [Bearer scope: playbook:write | playbook:publish]
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": {
"recipe": "<recipe>"
},
"name": "publish_workflow_recipe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Pass "replace" to overwrite an existing same-name recipe in place (one new version). Without it, a same-name recipe with different content is rejected; identical content is an idempotent no-op. | |
| recipe | Yes | Workflow recipe matching the workflowRecipeSchema (name, purpose, inputs[], steps[], outputs[], humanApprovalRequired, etc.) | |
| dotfileId | No | Deprecated alias for `playbookId`. | |
| playbookId | No | Playbook id (from list_playbooks). May be omitted only when the user owns exactly one playbook; otherwise the error lists their ids and titles. `dotfileId` is a deprecated alias. | |
| sensitivity | No | Optional re-declaration of the playbook's sensitivity. Applied exactly, even below the stored level, when acknowledgedTerms plus recorded acknowledgments cover every current sensitive-vocabulary match; otherwise the level rises or stays and privacyWarnings names the uncovered terms. | |
| acknowledgedTerms | No | Sensitive-vocabulary terms (from a prior warning or validate_playbook) the operator acknowledges so this write keeps its declared sensitivity. Merged with the playbook's recorded acknowledgments; non-matching terms are ignored; values shaped like secrets are still refused. |