publish_workflow
Publish, pause, or archive workflows in the Agentled MCP Server to control execution status and manage workflow lifecycle.
Instructions
Change the status of a workflow (publish, pause, or archive). Valid transitions: created/draft -> live, live -> paused, paused -> live, any -> archived. Use "live" to publish a draft workflow so it can be executed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID | |
| status | Yes | Target status |
Implementation Reference
- src/client.ts:129-134 (handler)The API client method that performs the network request to change the workflow status.
async publishWorkflow(id: string, status: string) { return this.request(`/workflows/${id}/status`, { method: 'PATCH', body: JSON.stringify({ status }), }); } - src/tools/workflows.ts:321-340 (registration)The MCP tool registration and handler implementation for "publish_workflow".
server.tool( 'publish_workflow', `Change the status of a workflow (publish, pause, or archive). Valid transitions: created/draft -> live, live -> paused, paused -> live, any -> archived. Use "live" to publish a draft workflow so it can be executed.`, { workflowId: z.string().describe('The workflow ID'), status: z.enum(['live', 'paused', 'archived']).describe('Target status'), }, async ({ workflowId, status }, extra) => { const client = clientFactory(extra); const result = await client.publishWorkflow(workflowId, status); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } );