Skip to main content
Glama

get_draft

Retrieve draft snapshots for live workflows to inspect pending changes before they modify production pipelines. Check draft status and configuration.

Instructions

Get the draft snapshot for a live workflow. When you update a live workflow, changes go to a draft instead of modifying the live pipeline. Use this to inspect the current draft state. Returns hasDraft: true/false and the draft config if it exists.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
workflowIdYesThe workflow ID

Implementation Reference

  • MCP tool registration and handler implementation for 'get_draft'. It uses the AgentledClient to fetch the draft data.
        server.tool(
            'get_draft',
            `Get the draft snapshot for a live workflow. When you update a live workflow, changes
    go to a draft instead of modifying the live pipeline. Use this to inspect the current draft
    state. Returns hasDraft: true/false and the draft config if it exists.`,
            {
                workflowId: z.string().describe('The workflow ID'),
            },
            async ({ workflowId }, extra) => {
                const client = clientFactory(extra);
                const result = await client.getDraft(workflowId);
                return {
                    content: [{
                        type: 'text' as const,
                        text: JSON.stringify(result, null, 2),
                    }],
                };
            }
        );
  • Actual implementation of the API call to fetch a workflow draft from the backend.
    async getDraft(workflowId: string) {
        return this.request(`/workflows/${workflowId}/draft`);
    }
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses that this is a read operation ('Get', 'inspect'), implies it's non-destructive, and describes the return structure ('Returns hasDraft: true/false and the draft config if it exists'). However, it lacks details on permissions, error handling, or rate limits, which are important for a tool with no annotations.

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 efficiently structured in three sentences: the first states the purpose, the second provides context, and the third explains the return value. Every sentence adds value without redundancy, making it front-loaded and concise.

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?

Given no annotations, no output schema, and a simple parameter schema, the description is fairly complete: it explains the tool's purpose, usage context, and return structure. However, for a tool with no annotations, it could benefit from more behavioral details like error cases or authentication needs, preventing a perfect score.

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

Parameters3/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 parameter 'workflowId' documented as 'The workflow ID'. The description doesn't add any parameter-specific semantics beyond what the schema provides, such as format examples or constraints. With high schema coverage, the baseline is 3.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get the draft snapshot for a live workflow' specifies the verb ('Get') and resource ('draft snapshot'), and it explains that drafts are created when updating live workflows. However, it doesn't explicitly differentiate from siblings like 'get_workflow' or 'promote_draft', which would require a 5.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: 'When you update a live workflow, changes go to a draft instead of modifying the live pipeline. Use this to inspect the current draft state.' This gives practical guidance on its purpose. It doesn't explicitly state when not to use it or name alternatives like 'get_workflow', so it falls short of a 5.

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