discard_draft
Abandon draft changes for a workflow and revert to the current live version, keeping the live pipeline configuration unchanged.
Instructions
Discard the draft snapshot for a live workflow. The live pipeline config stays unchanged. Use this to abandon draft changes and go back to the current live version.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workflowId | Yes | The workflow ID |
Implementation Reference
- src/client.ts:173-177 (handler)The implementation of the `discardDraft` method in the `AgentledClient` class, which performs the DELETE request to the workflow draft endpoint.
async discardDraft(workflowId: string) { return this.request(`/workflows/${workflowId}/draft`, { method: 'DELETE', }); } - src/tools/workflows.ts:302-319 (registration)Registration of the `discard_draft` tool in the MCP server and its handler, which calls `client.discardDraft`.
server.tool( 'discard_draft', `Discard the draft snapshot for a live workflow. The live pipeline config stays unchanged. Use this to abandon draft changes and go back to the current live version.`, { workflowId: z.string().describe('The workflow ID'), }, async ({ workflowId }, extra) => { const client = clientFactory(extra); const result = await client.discardDraft(workflowId); return { content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2), }], }; } );