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),
                    }],
                };
            }
        );
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses that the tool discards a draft snapshot without affecting the live workflow, which is useful behavioral context. However, it lacks details on permissions needed, error conditions (e.g., if no draft exists), or side effects (e.g., whether the discard is irreversible), leaving gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the core purpose and followed by usage guidance. Every word contributes value, with no redundancy or fluff, making it highly efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a single-parameter mutation tool with no annotations and no output schema, the description does well by clarifying the purpose, usage, and effect (live config unchanged). However, it omits details on return values or error handling, which could be important for an agent invoking it. The high schema coverage helps compensate, but some behavioral aspects remain uncovered.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with the single parameter 'workflowId' documented as 'The workflow ID'. The description does not add further parameter details, which is acceptable given the high schema coverage. With only one parameter, a baseline of 4 is appropriate as the schema sufficiently explains it.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Discard the draft snapshot') and resource ('for a live workflow'), distinguishing it from siblings like 'delete_snapshot' (which likely removes a saved snapshot) and 'promote_draft' (which applies draft changes). It explicitly mentions that the live pipeline config remains unchanged, which clarifies the scope of the operation.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool: 'Use this to abandon draft changes and go back to the current live version.' This directly contrasts with alternatives like 'promote_draft' (which would apply draft changes) or 'update_workflow' (which might modify the live version), offering clear context for selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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