Skip to main content
Glama

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
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID

Implementation Reference

  • 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',
        });
    }
  • 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),
                    }],
                };
            }
        );

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Agentled/mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server