Publish Workflow
workflow.publishPublish a workflow's draft as a new version and turn it on. Confirm with the user before calling it. When the draft has errors nothing is published and the workflow stays as it was: errors say what to fix. When the agent this app signs in as has Ask first on for this, the call waits for its manager's approval and returns status: "pending_approval"; nothing changes until they approve. Pass reason (and targetNotes per target) so the approver sees why.
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": {
"workflowId": "<workflowId>"
},
"name": "workflow.publish"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | No | Why you are doing this, in one sentence the approver reads if Ask first holds the call | |
| workflowId | Yes | ||
| targetNotes | No | A short note per target, keyed by the id or Index you pass |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | ||
| errors | No | Why it was not published; fix them with workflow.update | |
| status | No | The call waits for a person's approval; nothing has changed | |
| message | No | ||
| version | No | ||
| approver | No | Who decides it | |
| isActive | No | ||
| warnings | No | ||
| published | No | ||
| approvalId | No | The approval the call waits on | |
| workflowId | No |